Sha256: d08546aa5557c237de8b8bcaa16331c8a025a2bd159c83da23ee4bc4b80931f9

Contents?: true

Size: 493 Bytes

Versions: 133

Compression:

Stored size: 493 Bytes

Contents

require 'helper'

describe Bearcat::Client::Pages do
  before do
    @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token")
  end

  it "returns a courses pages" do
    stub_get(@client, "/api/v1/courses/1/pages").to_return(json_response("pages.json"))
    pages = @client.list_course_pages('1')
    pages.class.should eq(Bearcat::ApiArray)
    pages.count.should == 2
    pages.first['page_id'].should == 1
    pages.last['page_id'].should == 2
  end

end

Version data entries

133 entries across 133 versions & 1 rubygems

Version Path
bearcat-1.3.1 spec/bearcat/client/pages_spec.rb
bearcat-1.2.18 spec/bearcat/client/pages_spec.rb
bearcat-1.2.17 spec/bearcat/client/pages_spec.rb
bearcat-1.2.16 spec/bearcat/client/pages_spec.rb
bearcat-1.2.15 spec/bearcat/client/pages_spec.rb
bearcat-1.2.14 spec/bearcat/client/pages_spec.rb
bearcat-1.2.13 spec/bearcat/client/pages_spec.rb
bearcat-1.2.12 spec/bearcat/client/pages_spec.rb
bearcat-1.2.11 spec/bearcat/client/pages_spec.rb
bearcat-1.2.10 spec/bearcat/client/pages_spec.rb
bearcat-1.2.9 spec/bearcat/client/pages_spec.rb
bearcat-1.2.7 spec/bearcat/client/pages_spec.rb
bearcat-1.2.6 spec/bearcat/client/pages_spec.rb
bearcat-1.2.5 spec/bearcat/client/pages_spec.rb
bearcat-1.2.4 spec/bearcat/client/pages_spec.rb
bearcat-1.2.3 spec/bearcat/client/pages_spec.rb
bearcat-1.2.1 spec/bearcat/client/pages_spec.rb
bearcat-1.2.0 spec/bearcat/client/pages_spec.rb
bearcat-1.1.1 spec/bearcat/client/pages_spec.rb
bearcat-1.1.0 spec/bearcat/client/pages_spec.rb