spec/lib/buttercms/butter_resource_spec.rb in buttercms-ruby-1.4 vs spec/lib/buttercms/butter_resource_spec.rb in buttercms-ruby-1.5
- old
+ new
@@ -9,11 +9,11 @@
end
describe '.all' do
it 'should make a request with the correct endpoint' do
- expect(ButterCMS).to receive(:request).with('/', {})
+ expect(ButterCMS).to receive(:request).with('', {})
ButterCMS::ButterResource.all()
end
it 'should return a collection' do
objects = ButterCMS::ButterResource.all
@@ -22,10 +22,10 @@
end
end
describe '.find' do
it 'should make a request with the correct endpoint' do
- expect(ButterCMS).to receive(:request).with('/1', {})
+ expect(ButterCMS).to receive(:request).with('1/', {})
ButterCMS::ButterResource.find(1)
end
it 'should return one object' do
expect(ButterCMS::ButterResource.find(1)).to be_a(ButterCMS::ButterResource)