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

Version Path
govdelivery-tms-3.0.0 spec/keywords_spec.rb
govdelivery-tms-2.8.4 spec/keywords_spec.rb
govdelivery-tms-2.8.3 spec/keywords_spec.rb
govdelivery-tms-0.10.1 spec/keywords_spec.rb
govdelivery-tms-0.10.0 spec/keywords_spec.rb
govdelivery-tms-0.9.4 spec/keywords_spec.rb
govdelivery-tms-0.9.3 spec/keywords_spec.rb
govdelivery-tms-0.9.2 spec/keywords_spec.rb
govdelivery-tms-0.9.0 spec/keywords_spec.rb
govdelivery-tms-0.8.14 spec/keywords_spec.rb
govdelivery-tms-0.8.13 spec/keywords_spec.rb
govdelivery-tms-0.8.12 spec/keywords_spec.rb
govdelivery-tms-0.8.11 spec/keywords_spec.rb
govdelivery-tms-0.8.10 spec/keywords_spec.rb
govdelivery-tms-0.8.9 spec/keywords_spec.rb
govdelivery-tms-0.8.8 spec/keywords_spec.rb
govdelivery-tms-0.8.7 spec/keywords_spec.rb
govdelivery-tms-0.8.5 spec/keywords_spec.rb
govdelivery-tms-0.8.4 spec/keywords_spec.rb
govdelivery-tms-0.8.3 spec/keywords_spec.rb