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.28 spec/bearcat/client/folders_spec.rb
bearcat-1.3.27 spec/bearcat/client/folders_spec.rb
bearcat-1.3.26 spec/bearcat/client/folders_spec.rb
bearcat-1.3.25 spec/bearcat/client/folders_spec.rb
bearcat-1.3.24 spec/bearcat/client/folders_spec.rb
bearcat-1.3.23 spec/bearcat/client/folders_spec.rb
bearcat-1.3.22 spec/bearcat/client/folders_spec.rb
bearcat-1.3.21 spec/bearcat/client/folders_spec.rb
bearcat-1.3.20 spec/bearcat/client/folders_spec.rb
bearcat-1.3.19 spec/bearcat/client/folders_spec.rb
bearcat-1.3.18 spec/bearcat/client/folders_spec.rb
bearcat-1.3.17 spec/bearcat/client/folders_spec.rb
bearcat-1.3.16 spec/bearcat/client/folders_spec.rb
bearcat-1.3.15 spec/bearcat/client/folders_spec.rb
bearcat-1.3.14 spec/bearcat/client/folders_spec.rb
bearcat-1.3.13 spec/bearcat/client/folders_spec.rb
bearcat-1.3.12 spec/bearcat/client/folders_spec.rb
bearcat-1.3.11 spec/bearcat/client/folders_spec.rb
bearcat-1.3.10 spec/bearcat/client/folders_spec.rb
bearcat-1.3.9 spec/bearcat/client/folders_spec.rb