Sha256: 6766de350d4b918b902d95552195af8e3a38c42c36e6016d7de5c2f9872c1831
Contents?: true
Size: 962 Bytes
Versions: 7
Compression:
Stored size: 962 Bytes
Contents
require 'spec_helper' require_relative '../../lib/sredder/wrike_request' describe Sredder::WrikeRequest do describe 'initialization' do it 'accepts the oauth access token as an arg' do access_token = stub('access_token') request = Sredder::WrikeRequest.new(access_token) request.access_token.should == access_token end end describe '#post' do it 'passes parameter and headers to the put of the access token' do access_token = stub('access_token') access_token.should_receive(:post). with('/do_stuff', {}, Sredder::WrikeRequest::HEADERS) request = Sredder::WrikeRequest.new(access_token) request.post('/do_stuff', {}) end it 'it assigns the response' do access_token = stub('access_token', :post => 'response') request = Sredder::WrikeRequest.new(access_token) request.post('/do_stuff', {}) request.response.should == 'response' end end end
Version data entries
7 entries across 7 versions & 1 rubygems