Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Lelievre-david committed Dec 19, 2024
1 parent 56bc8ef commit ff51f7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions spec/acceptance/api/v1/requests_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@
end

put '/api/v1/requests/:id' do

let!(:request3) { requests(:request3) }
let(:id) { request3.id }

Expand All @@ -262,7 +261,7 @@
type: :integer

let(:plant_stage_id) { Plant.last.plant_stages.last.id }
let(:name) { 'My request'}
let(:name) { 'My request' }
let(:plant_name) { Plant.last.name }
let(:plant_stage_name) { Plant.last.plant_stages.last.name }
let(:due_date) { Date.current + 6.months }
Expand Down
4 changes: 3 additions & 1 deletion spec/requests/api/v1/requests_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,13 @@
end
end
end

context 'when 422' do
let!(:request3) { requests(:request3) }
let!(:id) { request3.id }

it_behaves_like 'with authenticated grower' do
it 'fails to update a request' do

allow_any_instance_of(Request).to receive(:update).and_return(false)

put(
Expand All @@ -478,6 +478,7 @@
end
end
end

context 'when 404' do
it_behaves_like 'with authenticated grower' do
it 'can\'t update a request that doesn\'t exist' do
Expand All @@ -499,6 +500,7 @@
end
end
end

context 'when 401' do
it_behaves_like 'without authentication' do
it 'can\'t update a request' do
Expand Down

0 comments on commit ff51f7b

Please sign in to comment.