Sha256: 4596ca87337e9dd6bb87ffa3f04a28d3a4ff5c67ac39d2ffb260769606f98ad7
Contents?: true
Size: 998 Bytes
Versions: 1
Compression:
Stored size: 998 Bytes
Contents
require 'spec_helper' describe Spree::API::Client do describe ".new" do it "is a Spree::API::Client" do Spree::API::Client.new('http://example.com/api', 'randomtokenstring').should be_a(Spree::API::Client) end end describe 'api_endpoint' do it 'should be stored' do client = Spree::API::Client.new('http://example.com/api', 'randomtokenstring') client.api_endpoint.should eql('http://example.com/api') end end describe 'api_token' do it 'should be stored' do client = Spree::API::Client.new('http://example.com/api', 'randomtokenstring') client.api_token.should eql('randomtokenstring') end end describe 'request' do use_vcr_cassette "request", :record => :new_episodes it 'should load stuff from the api' do client = Spree::API::Client.new('http://localhost:4000/store/api', 'randomtokenstring') response = client.request(:get, 'products') response.should be_a(Faraday::Response) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree-api-client-0.0.2 | spec/client_spec.rb |