diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-03-03 15:40:05 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-03-07 21:59:39 +0100 |
commit | 49295924586d89eaff899a4efc83a336148f3862 (patch) | |
tree | 0f38bf5ce1a765a89a0a55ab431a03efbc888dd1 /spec/services/git_push_service_spec.rb | |
parent | 4e8a5343972e179022ff84954475a6aa0f8901f8 (diff) | |
download | gitlab-ce-49295924586d89eaff899a4efc83a336148f3862.tar.gz |
adds test for git push service for updating the language of the project
Diffstat (limited to 'spec/services/git_push_service_spec.rb')
-rw-r--r-- | spec/services/git_push_service_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index 994585fb32c..f5c51e46e8b 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -155,6 +155,23 @@ describe GitPushService, services: true do end end + describe "Updates main language" do + + context "before push" do + it { expect(project.main_language).to eq(nil) } + end + + context "after push" do + before do + @service = execute_service(project, user, @oldrev, @newrev, @ref) + end + + it { expect(@service.update_main_language).to eq(true) } + it { expect(project.main_language).to eq("Ruby") } + end + end + + describe "Web Hooks" do context "execute web hooks" do it "when pushing a branch for the first time" do |