Sha256: be54e25aba86135d973e8e3dc3631111456d209767599598e13be1d6c6cdfefb
Contents?: true
Size: 642 Bytes
Versions: 20
Compression:
Stored size: 642 Bytes
Contents
require 'spec_helper' describe GovDelivery::TMS::Keywords do context 'loading keywords' do let(:client) do double('client') end before do @keywords = GovDelivery::TMS::Keywords.new(client, '/keywords') end it 'should GET ok' do body = [ { 'name' => 'services', '_links' => { 'self' => '/keywords/1' } }, { 'name' => 'subscribe', '_links' => { 'self' => '/keywords/2' } } ] expect(@keywords.client).to receive(:get).and_return(double('response', body: body, status: 200, headers: {})) @keywords.get expect(@keywords.collection.length).to eq(2) end end end
Version data entries
20 entries across 20 versions & 1 rubygems