Sha256: 969dcfa9a43c64e3d700edcae43029b4f5737d592b3b509a12817066aa9bf57b
Contents?: true
Size: 950 Bytes
Versions: 2
Compression:
Stored size: 950 Bytes
Contents
require 'spec_helper' describe FutureTransfer do let(:transfer) { described_class } describe '#initialize' do it 'creates an empty array when initialized' do expect(transfer.new(message: 'transfer').files).to be_kind_of(Array) end it 'throws a error when message is not given' do expect { transfer.new }.to raise_error ArgumentError end end describe 'getters' do it 'message' do transfer.new(message: 'test').message end it 'files' do transfer.new(message: 'test').files end end describe 'to_request_params' do it 'includes the message' do new_transfer = transfer.new(message: 'test') expect(new_transfer.to_request_params[:message]).to be(new_transfer.message) end it 'includes the files as an array' do new_transfer = transfer.new(message: 'test') expect(new_transfer.to_request_params[:files]).to eq([]) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wetransfer-0.9.0.beta1 | spec/we_transfer_client/future_transfer_spec.rb |
wetransfer-0.9.0.beta | spec/we_transfer_client/future_transfer_spec.rb |