summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-26 12:55:57 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-26 12:55:57 +0300
commit9ecd3bc6cebf63e5040084032cf99adec18c859f (patch)
treeb8eb1cb9611ef9f5f754a58aba97b111c0a0d65d /spec
parent8fae6ad75a5e474d17d504056af606f99183a6fb (diff)
downloadgitlab-ce-9ecd3bc6cebf63e5040084032cf99adec18c859f.tar.gz
Improve git_push service specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/services/git_push_service_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb
index fa99acabc78..9afa4953d61 100644
--- a/spec/services/git_push_service_spec.rb
+++ b/spec/services/git_push_service_spec.rb
@@ -14,6 +14,32 @@ describe GitPushService do
@ref = 'refs/heads/master'
end
+ describe 'Push branches' do
+ context 'new branch' do
+ subject do
+ service.execute(project, user, @blankrev, @newrev, @ref)
+ end
+
+ it { should be_true }
+ end
+
+ context 'existing branch' do
+ subject do
+ service.execute(project, user, @oldrev, @newrev, @ref)
+ end
+
+ it { should be_true }
+ end
+
+ context 'rm branch' do
+ subject do
+ service.execute(project, user, @oldrev, @blankrev, @ref)
+ end
+
+ it { should be_true }
+ end
+ end
+
describe "Git Push Data" do
before do
service.execute(project, user, @oldrev, @newrev, @ref)