Sha256: 41126d3a50a33e0b5699fb885d54d8db6e3706c1cec4392b69d43a3575a964d4

Contents?: true

Size: 723 Bytes

Versions: 4

Compression:

Stored size: 723 Bytes

Contents

# frozen_string_literal: true

require File.expand_path("#{File.dirname(__FILE__)}/spec_helper")

describe TokyoApi::Expire do
  subject { TokyoApi.new(host: 'test.com') }

  describe 'expire organisation' do
    let(:body) { fixture('expire/success') }
    let(:request_path) { '/expire/organisation/foo.com' }

    before(:each) do
      stub_get(request_path).to_return(body: body, status: status,
                                       headers: { content_type: 'application/json; charset=utf-8' })
    end

    describe 'success' do
      let(:status) { 200 }

      it 'should find an organisation' do
        expect(subject.expire.organisation('foo.com')).to eq({ 'status' => 'success' })
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tokyo_api-1.9.0 spec/expire_spec.rb
tokyo_api-1.8.0 spec/expire_spec.rb
tokyo_api-1.7.0 spec/expire_spec.rb
tokyo_api-1.6.0 spec/expire_spec.rb