spec/lib/butter-ruby_spec.rb in buttercms-ruby-1.0.10 vs spec/lib/butter-ruby_spec.rb in buttercms-ruby-1.1.0
- old
+ new
@@ -2,14 +2,14 @@
describe ButterCMS do
describe '.request' do
context 'with an api token' do
before do
- ButterCMS.stub(:token).and_return('test123')
+ ButterCMS.stub(:api_token).and_return('test123')
end
it 'should make an api request' do
- stub_request(:get, ButterCMS.endpoint).to_return(body: JSON.generate({data: {test: 'test'}}))
+ stub_request(:get, 'https://api.buttercms.com/v2?auth_token=test123').to_return(body: JSON.generate({data: {test: 'test'}}))
expect{ ButterCMS.request('') }.to_not raise_error
end
end
context 'without an api token' do