Sha256: 4c65f4fcef0e104edf6aab23c5432cd221f6abcc90acd929c409ff312ff24f66

Contents?: true

Size: 696 Bytes

Versions: 12

Compression:

Stored size: 696 Bytes

Contents

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

12 entries across 12 versions & 1 rubygems

Version Path
tokyo_api-1.5.1 spec/expire_spec.rb
tokyo_api-1.5.0 spec/expire_spec.rb
tokyo_api-1.4.1 spec/expire_spec.rb
tokyo_api-1.3.1 spec/expire_spec.rb
tokyo_api-1.3.0 spec/expire_spec.rb
tokyo_api-1.2.0 spec/expire_spec.rb
tokyo_api-1.1.2 spec/expire_spec.rb
tokyo_api-1.1.0 spec/expire_spec.rb
tokyo_api-1.0.4 spec/expire_spec.rb
tokyo_api-1.0.2 spec/expire_spec.rb
tokyo_api-1.0.1 spec/expire_spec.rb
tokyo_api-0.6.1 spec/expire_spec.rb