From 9ecd3bc6cebf63e5040084032cf99adec18c859f Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 26 Sep 2014 12:55:57 +0300 Subject: Improve git_push service specs Signed-off-by: Dmitriy Zaporozhets --- spec/services/git_push_service_spec.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'spec') 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) -- cgit v1.2.1