Sha256: f308434bd6ee2921cfcf97affac8bc91b539fdef56f4b8c43866675992310255
Contents?: true
Size: 698 Bytes
Versions: 12
Compression:
Stored size: 698 Bytes
Contents
require 'helper' describe Bearcat::Client::ContentMigrations do before do @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token") end it 'uploads a file' do stub_post(@client, "my/upload/path"). with(:body => {"name" => "cc.imscc", "size" => "2034"}). to_return(json_response('content_migrations', 'upload_success.json')) stub_request(:post, "https://upload-url.invalid/"). to_return(status: 302, headers: {'Location' => 'https://confirm-upload.invalid/confirm?param=true'}) response = @client.upload_content_package('my/upload/path', fixture('cc.imscc')) expect(response['id']).to eq 293 end end
Version data entries
12 entries across 12 versions & 1 rubygems