Skip to content

Instantly share code, notes, and snippets.

@subhashb
Created February 5, 2014 17:18

Revisions

  1. subhashb created this gist Feb 5, 2014.
    35 changes: 35 additions & 0 deletions Search-Request-Specs.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    Api::V1::SearchController
    Search for courses
    returns the accessible courses to learner 3
    returns the accessible courses to publisher 1
    returns the accessible courses to learner 2
    iknowrecommendations returns recommended courses
    returns the accessible courses to publisher 2
    returns the accessible courses to learner 1
    correctly counts new courses for a user (PENDING: Temporarily disabled with xit)
    returns courses that were updated after learner viewed them (PENDING: Temporarily disabled with xit)
    responds with 200
    returns the accessible courses to publisher 3
    mypubs returns all courses published by publisher 1
    detects changes in enrollments (PENDING: Temporarily disabled with xit)
    mydrafts with pagination returns the correct results
    returns the accessible courses to group 1
    returns all courses to an admin
    mydrafts returns all draft courses by publisher 1
    Analytics service
    is notified
    with the right type

    Pending:
    Api::V1::SearchController Search for courses correctly counts new courses for a user
    # Temporarily disabled with xit
    # ./spec/requests/api/v1/search_spec.rb:394
    Api::V1::SearchController Search for courses returns courses that were updated after learner viewed them
    # Temporarily disabled with xit
    # ./spec/requests/api/v1/search_spec.rb:385
    Api::V1::SearchController Search for courses detects changes in enrollments
    # Temporarily disabled with xit
    # ./spec/requests/api/v1/search_spec.rb:402

    Finished in 27 minutes 0.65072 seconds
    18 examples, 0 failures, 3 pending