spec/bearcat/client/accounts_spec.rb in bearcat-0.9.12 vs spec/bearcat/client/accounts_spec.rb in bearcat-0.9.13
- old
+ new
@@ -9,7 +9,16 @@
stub_get(@client, "/api/v1/accounts/1").to_return(json_response("single_account.json"))
account = @client.account(1)
account["id"].should == 1
account["name"].should == "Local Testing"
end
-
+
+ it "returns enrollment terms for an account" do
+ stub_get(@client, "/api/v1/accounts/1/terms").to_return(json_response("enrollment_terms.json"))
+ account = @client.terms(1)
+ terms = account['enrollment_terms']
+ terms.count.should == 1
+ terms.first['id'].should == 4
+ terms.first['name'].should == 'Term 1'
+ end
+
end