mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-06 02:51:34 +00:00
Add more onliner before in specs
This commit is contained in:
@@ -116,9 +116,7 @@ describe DfcProvider::Api::CatalogItemsController, type: :controller do
|
||||
context 'with an enterprise' do
|
||||
context 'given with an id' do
|
||||
before do
|
||||
api_get :show,
|
||||
enterprise_id: enterprise.id,
|
||||
id: variant.id
|
||||
api_get :show, enterprise_id: enterprise.id, id: variant.id
|
||||
end
|
||||
|
||||
it 'is successful' do
|
||||
@@ -126,10 +124,8 @@ describe DfcProvider::Api::CatalogItemsController, type: :controller do
|
||||
end
|
||||
|
||||
it 'renders the required content' do
|
||||
expect(response.body)
|
||||
.to include('dfc:CatalogItem')
|
||||
expect(response.body)
|
||||
.to include("offers/#{variant.id}")
|
||||
expect(response.body).to include('dfc:CatalogItem')
|
||||
expect(response.body).to include("offers/#{variant.id}")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -21,10 +21,7 @@ describe DfcProvider::Api::PersonsController, type: :controller do
|
||||
end
|
||||
|
||||
context 'given with an accessible id' do
|
||||
before do
|
||||
api_get :show,
|
||||
id: user.id
|
||||
end
|
||||
before { api_get :show, id: user.id }
|
||||
|
||||
it 'is successful' do
|
||||
expect(response.status).to eq 200
|
||||
|
||||
@@ -26,9 +26,7 @@ describe DfcProvider::Api::SuppliedProductsController, type: :controller do
|
||||
context 'with an enterprise' do
|
||||
context 'given with an id' do
|
||||
before do
|
||||
api_get :show,
|
||||
enterprise_id: 'default',
|
||||
id: variant.id
|
||||
api_get :show, enterprise_id: 'default', id: variant.id
|
||||
end
|
||||
|
||||
it 'is successful' do
|
||||
@@ -36,8 +34,7 @@ describe DfcProvider::Api::SuppliedProductsController, type: :controller do
|
||||
end
|
||||
|
||||
it 'renders the required content' do
|
||||
expect(response.body)
|
||||
.to include(variant.name)
|
||||
expect(response.body).to include(variant.name)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user