summaryrefslogtreecommitdiff
path: root/qa/spec/factory
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2018-09-25 13:33:48 -0400
committerMark Lapierre <mlapierre@gitlab.com>2018-09-25 14:03:57 -0400
commitd8416288d360503bd2f208b62d5dae6df83206e8 (patch)
tree94c9415f9b859721ae19d4f059e81ca0a94527ef /qa/spec/factory
parent4ca1afec3534b7e70454bfd99552804c55ca0c83 (diff)
downloadgitlab-ce-ml-qa-code-owners.tar.gz
Add support for pushing and viewing filesml-qa-code-owners
The MR below adds a test for the code owners feature. This adds the part of those changes specific to CE - the ability to add and view files in a project. https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7368
Diffstat (limited to 'qa/spec/factory')
-rw-r--r--qa/spec/factory/repository/push_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/qa/spec/factory/repository/push_spec.rb b/qa/spec/factory/repository/push_spec.rb
new file mode 100644
index 00000000000..cdf5ada8ae8
--- /dev/null
+++ b/qa/spec/factory/repository/push_spec.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+describe QA::Factory::Repository::Push do
+ describe '.files=' do
+ let(:files) do
+ [
+ {
+ name: 'file.txt',
+ content: 'foo'
+ }
+ ]
+ end
+
+ subject { described_class.new }
+
+ it 'raises an error if files is not an array' do
+ expect { subject.files = '' }.to raise_error(ArgumentError)
+ end
+
+ it 'raises an error if files is an empty array' do
+ expect { subject.files = '[]' }.to raise_error(ArgumentError)
+ end
+
+ it 'does not raise if files is an array' do
+ expect { subject.files = files }.not_to raise_error
+ end
+ end
+end