Commit 5e911c5d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Prefer local variables instead

parent a17f4c23
module QA module QA
feature 'deploy keys support', :core do feature 'deploy keys support', :core do
given(:key) { Runtime::RSAKey.new }
given(:deploy_key_title) { 'deploy key title' }
given(:deploy_key_value) { key.public_key }
scenario 'user adds a deploy key' do scenario 'user adds a deploy key' do
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials } Page::Main::Login.act { sign_in_using_credentials }
key = Runtime::RSAKey.new
deploy_key_title = 'deploy key title'
deploy_key_value = key.public_key
deploy_key = Factory::Resource::DeployKey.fabricate! do |resource| deploy_key = Factory::Resource::DeployKey.fabricate! do |resource|
resource.title = deploy_key_title resource.title = deploy_key_title
resource.key = deploy_key_value resource.key = deploy_key_value
......
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