diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2016-08-30 17:06:40 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2016-09-02 12:49:40 +0300 |
commit | a93a610bac7d9ee7c0908592b6a5d91ef0d94333 (patch) | |
tree | eeec3f3161f74abd2f213145c7ce9d55f5f471e1 /spec/lib/gitlab/popen_spec.rb | |
parent | fd1741b47970fc52d994367ba38b5d1353d94725 (diff) |
Use 'git update-ref' for safer web commits
Diffstat (limited to 'spec/lib/gitlab/popen_spec.rb')
-rw-r--r-- | spec/lib/gitlab/popen_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/popen_spec.rb b/spec/lib/gitlab/popen_spec.rb index e8b236426e9..4ae216d55b0 100644 --- a/spec/lib/gitlab/popen_spec.rb +++ b/spec/lib/gitlab/popen_spec.rb @@ -40,4 +40,13 @@ describe 'Gitlab::Popen', lib: true, no_db: true do it { expect(@status).to be_zero } it { expect(@output).to include('spec') } end + + context 'use stdin' do + before do + @output, @status = @klass.new.popen(%w[cat]) { |stdin| stdin.write 'hello' } + end + + it { expect(@status).to be_zero } + it { expect(@output).to eq('hello') } + end end |