Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-08-30 17:06:40 +0300
committerJacob Vosmaer <jacob@gitlab.com>2016-09-02 12:49:40 +0300
commita93a610bac7d9ee7c0908592b6a5d91ef0d94333 (patch)
treeeeec3f3161f74abd2f213145c7ce9d55f5f471e1 /spec/lib/gitlab/popen_spec.rb
parentfd1741b47970fc52d994367ba38b5d1353d94725 (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.rb9
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