diff options
author | Mark Lapierre <mlapierre@gitlab.com> | 2018-09-25 20:33:48 +0300 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2018-10-17 22:18:22 +0300 |
commit | c57ac000067b73640033a359267dbacf57e7d2d0 (patch) | |
tree | 775519a970ddaf0d294416552373b2860ab357ad /qa/spec | |
parent | 8131b64ae842cf304b049bb248560245a99bc26a (diff) |
Add support for pushing and viewing files
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')
-rw-r--r-- | qa/spec/factory/repository/push_spec.rb | 26 |
1 files changed, 26 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..2eb6c008248 --- /dev/null +++ b/qa/spec/factory/repository/push_spec.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +describe QA::Factory::Repository::Push do + describe '.files=' do + let(:files) do + [ + { + name: 'file.txt', + content: 'foo' + } + ] + end + + 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 |