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

Version Path
bearcat-1.5.37 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.36 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.35 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.34 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.33 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.32 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.31 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.30 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.29 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.28 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.28.beta1 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.26 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.24 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.23 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.20 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.19 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.17 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.16 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.15 spec/bearcat/client/conferences_spec.rb
bearcat-1.5.14 spec/bearcat/client/conferences_spec.rb