Skip to content

Commit f874604

Browse files
committed
Move before below lets in updating project feature spec
This is more idiomatic and thus easier to read.
1 parent 7cf9faf commit f874604

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/features/project/updating_a_project_spec.rb

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

55
RSpec.describe 'Updating a project', type: :request do
6-
before do
7-
authenticated_in_hydra_as(owner)
8-
9-
create(:component, project:, name: 'main', extension: 'py', content: 'print("hi")')
10-
end
11-
126
let(:headers) { { Authorization: UserProfileMock::TOKEN } }
137
let(:project_type) { Project::Types::PYTHON }
148
let(:user_id) { owner.id }
@@ -27,6 +21,12 @@
2721
}
2822
end
2923

24+
before do
25+
authenticated_in_hydra_as(owner)
26+
27+
create(:component, project:, name: 'main', extension: 'py', content: 'print("hi")')
28+
end
29+
3030
it 'responds 200 OK' do
3131
put("/api/projects/#{project.id}", headers:, params:)
3232
expect(response).to have_http_status(:ok)

0 commit comments

Comments
 (0)