diff options
author | Michael Kozono <mkozono@gmail.com> | 2018-05-24 17:04:59 -0700 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2018-06-08 09:05:06 -0700 |
commit | 01400a08a08fe68f96da18a377cda8a1e972480e (patch) | |
tree | 693fb9aa1ebb387d9faeb0d3de944a5d53771c6f /qa/qa/factory | |
parent | c5bcae5dd657af0f17219dc708ad33f17bcf3bb1 (diff) | |
download | gitlab-ce-01400a08a08fe68f96da18a377cda8a1e972480e.tar.gz |
Reuse Push factory
Diffstat (limited to 'qa/qa/factory')
-rw-r--r-- | qa/qa/factory/repository/push.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/qa/qa/factory/repository/push.rb b/qa/qa/factory/repository/push.rb index 28711c12701..7bb808652da 100644 --- a/qa/qa/factory/repository/push.rb +++ b/qa/qa/factory/repository/push.rb @@ -3,7 +3,7 @@ module QA module Repository class Push < Factory::Base attr_accessor :file_name, :file_content, :commit_message, - :branch_name, :new_branch + :branch_name, :new_branch, :output attr_writer :remote_branch @@ -12,6 +12,10 @@ module QA project.description = 'Project with repository' end + product :output do |factory| + factory.output + end + def initialize @file_name = 'file.txt' @file_content = '# This is test project' @@ -58,7 +62,7 @@ module QA end repository.commit(commit_message) - repository.push_changes("#{branch_name}:#{remote_branch}") + @output = repository.push_changes("#{branch_name}:#{remote_branch}") end end end |