bearcat 0.9.12 → 0.9.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,10 @@ module Bearcat
6
6
  get("/api/v1/accounts/#{account}")
7
7
  end
8
8
 
9
+ def terms(account, params = {})
10
+ get("/api/v1/accounts/#{account}/terms")
11
+ end
12
+
9
13
  end
10
14
  end
11
15
  end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '0.9.12' unless defined?(Bearcat::VERSION)
2
+ VERSION = '0.9.13' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -11,5 +11,14 @@ describe Bearcat::Client::Accounts do
11
11
  account["id"].should == 1
12
12
  account["name"].should == "Local Testing"
13
13
  end
14
-
14
+
15
+ it "returns enrollment terms for an account" do
16
+ stub_get(@client, "/api/v1/accounts/1/terms").to_return(json_response("enrollment_terms.json"))
17
+ account = @client.terms(1)
18
+ terms = account['enrollment_terms']
19
+ terms.count.should == 1
20
+ terms.first['id'].should == 4
21
+ terms.first['name'].should == 'Term 1'
22
+ end
23
+
15
24
  end
@@ -0,0 +1,12 @@
1
+ {
2
+ "enrollment_terms": [
3
+ {
4
+ "end_at": "2014-06-30T06:00:00Z",
5
+ "id": 4,
6
+ "name": "Term 1",
7
+ "start_at": "2013-12-01T07:00:00Z",
8
+ "workflow_state": "active",
9
+ "sis_term_id": null
10
+ }
11
+ ]
12
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.12
4
+ version: 0.9.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -166,6 +166,7 @@ files:
166
166
  - spec/fixtures/delete_section.json
167
167
  - spec/fixtures/deleted_conversation.json
168
168
  - spec/fixtures/enroll_student.json
169
+ - spec/fixtures/enrollment_terms.json
169
170
  - spec/fixtures/group_conferences.json
170
171
  - spec/fixtures/link_unlink_outcome.json
171
172
  - spec/fixtures/module_item_sequence.json
@@ -263,6 +264,7 @@ test_files:
263
264
  - spec/fixtures/delete_section.json
264
265
  - spec/fixtures/deleted_conversation.json
265
266
  - spec/fixtures/enroll_student.json
267
+ - spec/fixtures/enrollment_terms.json
266
268
  - spec/fixtures/group_conferences.json
267
269
  - spec/fixtures/link_unlink_outcome.json
268
270
  - spec/fixtures/module_item_sequence.json