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.2.5 spec/bearcat/client/folders_spec.rb
bearcat-1.2.4 spec/bearcat/client/folders_spec.rb
bearcat-1.2.3 spec/bearcat/client/folders_spec.rb
bearcat-1.2.1 spec/bearcat/client/folders_spec.rb
bearcat-1.2.0 spec/bearcat/client/folders_spec.rb
bearcat-1.1.1 spec/bearcat/client/folders_spec.rb
bearcat-1.1.0 spec/bearcat/client/folders_spec.rb
bearcat-1.0.28 spec/bearcat/client/folders_spec.rb
bearcat-1.0.27 spec/bearcat/client/folders_spec.rb
bearcat-1.0.26 spec/bearcat/client/folders_spec.rb
bearcat-1.0.25 spec/bearcat/client/folders_spec.rb
bearcat-1.0.24 spec/bearcat/client/folders_spec.rb
bearcat-1.0.23 spec/bearcat/client/folders_spec.rb