Sha256: 41997963257c4ed53a6e582555e1e06d8378f311e3171989147907b0b85fa9b5

Contents?: true

Size: 508 Bytes

Versions: 53

Compression:

Stored size: 508 Bytes

Contents

require 'helper'

describe Bearcat::Client::Folders do
  let(:client) { Bearcat::Client.new(token: 'test_token', prefix: 'https://canvas.instructure.com') }

  it 'returns a list of folders in a course' do
    stub_get(client, '/api/v1/courses/7/folders').to_return(json_response('course_folders.json'))
    folders = client.list_course_folders 7
    expect(folders.map { |f| f['id'] }).to eql [1, 593]
    expect(folders.map { |f| f['full_name'] }).to eql ['course files', 'course files/folder1']
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
bearcat-1.3.8 spec/bearcat/client/folders_spec.rb
bearcat-1.3.7 spec/bearcat/client/folders_spec.rb
bearcat-1.3.6 spec/bearcat/client/folders_spec.rb
bearcat-1.3.5 spec/bearcat/client/folders_spec.rb
bearcat-1.3.4 spec/bearcat/client/folders_spec.rb
bearcat-1.3.3 spec/bearcat/client/folders_spec.rb
bearcat-1.3.2 spec/bearcat/client/folders_spec.rb
bearcat-1.3.1 spec/bearcat/client/folders_spec.rb
bearcat-1.2.18 spec/bearcat/client/folders_spec.rb
bearcat-1.2.17 spec/bearcat/client/folders_spec.rb
bearcat-1.2.16 spec/bearcat/client/folders_spec.rb
bearcat-1.2.15 spec/bearcat/client/folders_spec.rb
bearcat-1.2.14 spec/bearcat/client/folders_spec.rb
bearcat-1.2.13 spec/bearcat/client/folders_spec.rb
bearcat-1.2.12 spec/bearcat/client/folders_spec.rb
bearcat-1.2.11 spec/bearcat/client/folders_spec.rb
bearcat-1.2.10 spec/bearcat/client/folders_spec.rb
bearcat-1.2.9 spec/bearcat/client/folders_spec.rb
bearcat-1.2.7 spec/bearcat/client/folders_spec.rb
bearcat-1.2.6 spec/bearcat/client/folders_spec.rb