Created
February 20, 2014 00:41
-
-
Save perryqh/9104667 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe AdapterFactory do | |
describe :create do | |
context 'site-link' do | |
let(:endpoint_url) { 'http://endpoint' } | |
let(:corporate_code) { 'cc' } | |
let(:user) { 'user' } | |
let(:password) { 'pw' } | |
let(:site_link) { double } | |
let(:store_code) { 'need this for unit_type_price_list'} | |
it 'creates a site link adapter' do | |
Sitelinkclient::ServiceClient.should_receive(:new).with(endpoint_url: endpoint_url, corporate_code: corporate_code, user: user, password: password).and_return(site_link) | |
site_link = AdapterFactory.create endpoint_url: endpoint_url, corporate_code: corporate_code, user: user, password: password | |
site_link.should eq(site_link) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment