Sha256: 02e241dbb59e41e69c8172d63f319ae15d11f004eef50ba4385dd2bd8b4a809a
Contents?: true
Size: 1.04 KB
Versions: 4
Compression:
Stored size: 1.04 KB
Contents
describe ChatWork::File do describe ".get", type: :api do subject { ChatWork::File.get(room_id: room_id, account_id: account_id) } before do stub_chatwork_request(:get, "/rooms/#{room_id}/files", "/rooms/{room_id}/files") end let(:room_id) { 123 } let(:account_id) { 101 } it_behaves_like :a_chatwork_api, :get, "/rooms/{room_id}/files" end describe ".find", type: :api do subject { ChatWork::File.find(room_id: room_id, file_id: file_id, create_download_url: create_download_url) } before do stub_chatwork_request(:get, "/rooms/#{room_id}/files/#{file_id}", "/rooms/{room_id}/files/{file_id}") end let(:room_id) { 123 } let(:file_id) { 101 } context "when force is Integer" do let(:create_download_url) { 1 } it_behaves_like :a_chatwork_api, :get, "/rooms/{room_id}/files/{file_id}" end context "when force is boolean" do let(:create_download_url) { true } it_behaves_like :a_chatwork_api, :get, "/rooms/{room_id}/files/{file_id}" end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
chatwork-0.7.0 | spec/lib/chatwork/file_spec.rb |
chatwork-0.6.2 | spec/lib/chatwork/file_spec.rb |
chatwork-0.6.1 | spec/lib/chatwork/file_spec.rb |
chatwork-0.6.0 | spec/lib/chatwork/file_spec.rb |