diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-05-21 15:15:31 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-06-02 16:46:01 +0300 |
commit | b931c11e1b7acef5044e9c6a44145dd967196b99 (patch) | |
tree | a8de5ada48c9eb64f24dc07fc3b4c383595a8a20 /spec/models | |
parent | 1c328fa4d7c8c2c1e8717a6f35c5ae21272846e8 (diff) | |
download | gitlab-ce-b931c11e1b7acef5044e9c6a44145dd967196b99.tar.gz |
GitLab CI service sends gitlab-ci.yml fileci_yml_file
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_services/gitlab_ci_service_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/project_services/gitlab_ci_service_spec.rb b/spec/models/project_services/gitlab_ci_service_spec.rb index e5bf9125313..ebd8b545aa7 100644 --- a/spec/models/project_services/gitlab_ci_service_spec.rb +++ b/spec/models/project_services/gitlab_ci_service_spec.rb @@ -48,6 +48,21 @@ describe GitlabCiService do it { expect(@service.build_page("2ab7834c", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/2ab7834c")} it { expect(@service.build_page("issue#2", 'master')).to eq("http://ci.gitlab.org/projects/2/refs/master/commits/issue%232")} end + + describe "execute" do + let(:user) { create(:user, username: 'username') } + let(:project) { create(:project, name: 'project') } + let(:push_sample_data) { Gitlab::PushDataBuilder.build_sample(project, user) } + + it "calls ci_yaml_file" do + service_hook = double + service_hook.should_receive(:execute) + @service.should_receive(:service_hook).and_return(service_hook) + @service.should_receive(:ci_yaml_file).with(push_sample_data) + + @service.execute(push_sample_data) + end + end end describe "Fork registration" do |