Skip to content

Commit 6c587f6

Browse files
committed
Move before below lets in create project feature spec
This is more idiomatic and easier to follow.
1 parent fd9fdcc commit 6c587f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/features/project/creating_a_project_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
require 'rails_helper'
44

55
RSpec.describe 'Creating a project', type: :request do
6-
before do
7-
authenticated_in_hydra_as(teacher)
8-
mock_phrase_generation
9-
end
10-
116
let(:headers) { { Authorization: UserProfileMock::TOKEN } }
127
let(:teacher) { create(:teacher, school:) }
138
let(:school) { create(:school) }
@@ -24,6 +19,11 @@
2419
}
2520
end
2621

22+
before do
23+
authenticated_in_hydra_as(teacher)
24+
mock_phrase_generation
25+
end
26+
2727
it 'responds 201 Created' do
2828
post('/api/projects', headers:, params:)
2929
expect(response).to have_http_status(:created)

0 commit comments

Comments
 (0)