spec/bearcat/client/modules_spec.rb in bearcat-0.9.9 vs spec/bearcat/client/modules_spec.rb in bearcat-0.9.10
- old
+ new
@@ -10,6 +10,15 @@
modules = @client.course_modules(1)
modules.count.should == 3
modules.first['id'].should == 1
end
+ it "returns a course items module sequence" do
+ query = {"asset_type" => "assignment", "asset_id" => 22}
+ stub_get(@client, "/api/v1/courses/1/module_item_sequence").with(query: query).to_return(json_response("module_item_sequence.json"))
+ item_sequence = @client.course_module_item_sequence("1", query)
+ items = item_sequence["modules"]
+ items.count.should == 3
+ items.last["id"].should == 3
+ end
+
end
\ No newline at end of file