Skip to content

Commit

Permalink
[RUBY-3212] Refactor project name uniqueness validation in spec
Browse files Browse the repository at this point in the history
- Moved the creation of `existing_project` to a `before` block for better readability and consistency.
  • Loading branch information
jjromeo committed Sep 3, 2024
1 parent 079d25a commit e8453a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/steps/pafs_core/project_name_step_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
end

context "when name already exists" do
let!(:existing_project) { create(:project_name_step, name: "Unique Project Name") }
let(:duplicate_name_params) { ActionController::Parameters.new({ project_name_step: { name: "Unique Project Name" } }) }
before { create(:project_name_step, name: "Unique Project Name") }

it "returns false and sets the uniqueness error message" do
project_name_step.name = "Different Name"
Expand Down

0 comments on commit e8453a6

Please sign in to comment.