Commit 209b10b9 authored by Erick Banks's avatar Erick Banks

Use let syntax

parent 4c942812
...@@ -3,17 +3,18 @@ ...@@ -3,17 +3,18 @@
module QA module QA
RSpec.describe 'Plan', :smoke, :reliable do RSpec.describe 'Plan', :smoke, :reliable do
describe 'mention' do describe 'mention' do
before do let(:user) { Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) }
Flow::Login.sign_in let(:project) do
Resource::Project.fabricate_via_api! do |project|
@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 |project|
project.name = 'project-to-test-mention' project.name = 'project-to-test-mention'
project.visibility = 'private' project.visibility = 'private'
end end
end
before do
Flow::Login.sign_in
project.add_member(@user) project.add_member(user)
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api! do |issue|
issue.project = project issue.project = project
...@@ -22,7 +23,7 @@ module QA ...@@ -22,7 +23,7 @@ module QA
it 'mentions another user in an issue' do it 'mentions another user in an issue' do
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |show|
at_username = "@#{@user.username}" at_username = "@#{user.username}"
show.select_all_activities_filter show.select_all_activities_filter
show.comment(at_username) show.comment(at_username)
......
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