diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-20 19:59:23 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-20 19:59:23 -0700 |
| commit | 148724f3b057a0790be5386de23103db24a812eb (patch) | |
| tree | afab0ec86cb52d1db78613bddb4e6750ad83b80a /spec/controllers | |
| parent | 2fcaf253098ddd61bb5af6e96ddb93d331552d25 (diff) | |
return a json response.
Diffstat (limited to 'spec/controllers')
| -rw-r--r-- | spec/controllers/v1/liceneses_controller_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/controllers/v1/liceneses_controller_spec.rb b/spec/controllers/v1/liceneses_controller_spec.rb index bfc3618..0f08c05 100644 --- a/spec/controllers/v1/liceneses_controller_spec.rb +++ b/spec/controllers/v1/liceneses_controller_spec.rb @@ -39,10 +39,18 @@ describe V1::LicensesController do end describe :show do - it "returns the correct license" do - license = License.create + let(:license) { License.create } + + before :each do xhr :get, :show, id: license.id + end + + it "returns the correct license" do assigns(:license).should == license end + + it "returns a json response" do + expect(-> { JSON.parse(response.body) }).not_to raise_error + end end end |
