Sha256: 998cd33b645e08062bb911040909026a3accdcd66642b12bb529522d6a0d732a
Contents?: true
Size: 1.18 KB
Versions: 173
Compression:
Stored size: 1.18 KB
Contents
require 'helper' describe Bearcat::Client::Conferences do before do @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token") end it "lists course conferences" do stub_get(@client, "/api/v1/courses/3/conferences").to_return(json_response("course_conferences.json")) course_conferences = @client.course_conferences(3) course_conferences.count.should == 2 first_conference = course_conferences.first last_conference = course_conferences.last first_conference['title'].should == 'Conference 1' last_conference['title'].should == 'Conference 2' first_conference['user_settings']['scheduled_date'].should == '2014-01-18T07:00:00Z' last_conference['id'].should == 17 end it "lists group conferences" do stub_get(@client, "/api/v1/groups/1/conferences").to_return(json_response("group_conferences.json")) group_conferences = @client.group_conferences(1) group_conferences.count.should == 1 conference = group_conferences.first conference['title'].should == 'Conference group 1' conference['user_settings']['scheduled_date'].should == '2014-01-07T07:00:00Z' conference['id'].should == 19 end end
Version data entries
173 entries across 173 versions & 1 rubygems