Commit b5444745 authored by Walmyr Lima's avatar Walmyr Lima

Standardize project fabrication

In some places on QA tests in the Plan stage, when creating a
project, we do:

```ruby
Resource::Project.fabricate_via_api! do |resource|
  resource.name = 'project-name'
end
```

But in the majority of the tests, we do:

```ruby
Resource::Project.fabricate_via_api! do |project|
  project.name = 'project-name'
end
```

So better to stick with one way of doing it for standardization.
parent 17ad7094
......@@ -8,8 +8,8 @@ module QA
end
let(:project) do
Resource::Project.fabricate_via_api! do |resource|
resource.name = 'email-notification-test'
Resource::Project.fabricate_via_api! do |project|
project.name = 'email-notification-test'
end
end
......
......@@ -21,8 +21,8 @@ module QA
Flow::Login.sign_in
project = Resource::Project.fabricate_via_api! do |resource|
resource.name = 'xss-test-for-mentions-project'
project = Resource::Project.fabricate_via_api! do |project|
project.name = 'xss-test-for-mentions-project'
end
Flow::Project.add_member(project: project, username: user.username)
......
......@@ -8,9 +8,9 @@ module QA
@user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1)
project = Resource::Project.fabricate_via_api! do |resource|
resource.name = 'project-to-test-mention'
resource.visibility = 'private'
project = Resource::Project.fabricate_via_api! do |project|
project.name = 'project-to-test-mention'
project.visibility = 'private'
end
project.add_member(@user)
......
......@@ -63,8 +63,8 @@ module QA
before do
@user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1)
project = Resource::Project.fabricate_via_api! do |resource|
resource.name = 'project-to-test-assignee-issue-board-list'
project = Resource::Project.fabricate_via_api! do |project|
project.name = 'project-to-test-assignee-issue-board-list'
end
project.add_member(@user)
......
......@@ -11,8 +11,8 @@ module QA
user_3 = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_3, Runtime::Env.gitlab_qa_password_3)
user_4 = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_4, Runtime::Env.gitlab_qa_password_4)
project = Resource::Project.fabricate_via_api! do |resource|
resource.name = 'project-to-test-issue-with-multiple-assignees'
project = Resource::Project.fabricate_via_api! do |project|
project.name = 'project-to-test-issue-with-multiple-assignees'
end
project.add_member(user_1)
......
......@@ -4,8 +4,8 @@ module QA
context 'Plan', :reliable do
describe 'Multiple assignees per issue' do
let(:project) do
Resource::Project.fabricate_via_api! do |resource|
resource.name = 'project-to-test-issue-with-multiple-assignees'
Resource::Project.fabricate_via_api! do |project|
project.name = 'project-to-test-issue-with-multiple-assignees'
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment