diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-20 18:45:09 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-20 18:45:09 -0700 |
| commit | 5beba5ac1bac65d99eac14d55ee89d70254b58d3 (patch) | |
| tree | cc25cc8e1053d89e577f66995f1529fc0ca8775f /spec | |
| parent | ab6a0801874f7bd6590f6e57ee76cd2b74c30618 (diff) | |
allow clients to specify the number of items per page.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/controllers/v1/liceneses_controller_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/v1/liceneses_controller_spec.rb b/spec/controllers/v1/liceneses_controller_spec.rb index 7f1080c..5964556 100644 --- a/spec/controllers/v1/liceneses_controller_spec.rb +++ b/spec/controllers/v1/liceneses_controller_spec.rb @@ -21,5 +21,13 @@ describe V1::LicensesController do response.should be_success assigns(:licenses).should == licenses end + + it "returns the specified number of results" do + License.stub(:most_recent).with(1, 100).and_return(licenses) + + xhr :get, :index, per_page: 100 + response.should be_success + assigns(:licenses).should == licenses + end end end |
