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