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:
authorLin Jen-Shin <godfat@godfat.org>2016-08-11 08:35:35 +0300
committerLin Jen-Shin <godfat@godfat.org>2016-08-11 08:35:35 +0300
commit0b52517049fc8ac01407018c8a6225d7788861a3 (patch)
tree3c8c0cb1bdda06daa685c5f945ea99dd0c91dfc5 /spec/models/project_services/hipchat_service_spec.rb
parent5607fdf9fe51da75099effbaf8277c98290d6d96 (diff)
parent87b07f6a65a35a53bb1afed9d2a7da00caa8d59f (diff)
Merge remote-tracking branch 'upstream/master' into pipeline-hooks-without-slack
* upstream/master: (233 commits) Fix awardable button mutuality loading spinners Update CHANGELOG for 8.10.5 Clean up project destruction Small refactor of doc/development/README.md Avoid commit lookup on diff_helper Removed extra newline from redis_spec.rb Used cached value of project count to reduce DB load Remove duplicate link_to statements Mention add_column_with_default in downtime guide Add missing space to generic badge template Rename `run` task helper method to prevent conflict with StateMachine Add a method in Project to return a cached value of total count of projects spellcheck Add svg guidelines to ui guide Add Changelog entry for Grape upgrade [ci skip] Fix Grape tests. Retain old behavior Update Grape from 0.13.0 to 0.15.0. adds second batch of tests changed to active tense fixes part1 of files to start using active tense ...
Diffstat (limited to 'spec/models/project_services/hipchat_service_spec.rb')
-rw-r--r--spec/models/project_services/hipchat_service_spec.rb38
1 files changed, 19 insertions, 19 deletions
diff --git a/spec/models/project_services/hipchat_service_spec.rb b/spec/models/project_services/hipchat_service_spec.rb
index 79d7fb776f9..878afa13f1f 100644
--- a/spec/models/project_services/hipchat_service_spec.rb
+++ b/spec/models/project_services/hipchat_service_spec.rb
@@ -63,7 +63,7 @@ describe HipchatService, models: true do
WebMock.stub_request(:post, api_url)
end
- it 'should test and return errors' do
+ it 'tests and return errors' do
allow(hipchat).to receive(:execute).and_raise(StandardError, 'no such room')
result = hipchat.test(push_sample_data)
@@ -71,7 +71,7 @@ describe HipchatService, models: true do
expect(result[:result].to_s).to eq('no such room')
end
- it 'should use v1 if version is provided' do
+ it 'uses v1 if version is provided' do
allow(hipchat).to receive(:api_version).and_return('v1')
expect(HipChat::Client).to receive(:new).with(
token,
@@ -81,7 +81,7 @@ describe HipchatService, models: true do
hipchat.execute(push_sample_data)
end
- it 'should use v2 as the version when nothing is provided' do
+ it 'uses v2 as the version when nothing is provided' do
allow(hipchat).to receive(:api_version).and_return('')
expect(HipChat::Client).to receive(:new).with(
token,
@@ -92,13 +92,13 @@ describe HipchatService, models: true do
end
context 'push events' do
- it "should call Hipchat API for push events" do
+ it "calls Hipchat API for push events" do
hipchat.execute(push_sample_data)
expect(WebMock).to have_requested(:post, api_url).once
end
- it "should create a push message" do
+ it "creates a push message" do
message = hipchat.send(:create_push_message, push_sample_data)
push_sample_data[:object_attributes]
@@ -120,13 +120,13 @@ describe HipchatService, models: true do
[])
end
- it "should call Hipchat API for tag push events" do
+ it "calls Hipchat API for tag push events" do
hipchat.execute(push_sample_data)
expect(WebMock).to have_requested(:post, api_url).once
end
- it "should create a tag push message" do
+ it "creates a tag push message" do
message = hipchat.send(:create_push_message, push_sample_data)
push_sample_data[:object_attributes]
@@ -141,13 +141,13 @@ describe HipchatService, models: true do
let(:issue_service) { Issues::CreateService.new(project, user) }
let(:issues_sample_data) { issue_service.hook_data(issue, 'open') }
- it "should call Hipchat API for issue events" do
+ it "calls Hipchat API for issue events" do
hipchat.execute(issues_sample_data)
expect(WebMock).to have_requested(:post, api_url).once
end
- it "should create an issue message" do
+ it "creates an issue message" do
message = hipchat.send(:create_issue_message, issues_sample_data)
obj_attr = issues_sample_data[:object_attributes]
@@ -164,13 +164,13 @@ describe HipchatService, models: true do
let(:merge_service) { MergeRequests::CreateService.new(project, user) }
let(:merge_sample_data) { merge_service.hook_data(merge_request, 'open') }
- it "should call Hipchat API for merge requests events" do
+ it "calls Hipchat API for merge requests events" do
hipchat.execute(merge_sample_data)
expect(WebMock).to have_requested(:post, api_url).once
end
- it "should create a merge request message" do
+ it "creates a merge request message" do
message = hipchat.send(:create_merge_request_message,
merge_sample_data)
@@ -194,7 +194,7 @@ describe HipchatService, models: true do
note: 'a comment on a commit')
end
- it "should call Hipchat API for commit comment events" do
+ it "calls Hipchat API for commit comment events" do
data = Gitlab::DataBuilder::NoteDataBuilder.build(commit_note, user)
hipchat.execute(data)
@@ -226,7 +226,7 @@ describe HipchatService, models: true do
note: "merge request note")
end
- it "should call Hipchat API for merge request comment events" do
+ it "calls Hipchat API for merge request comment events" do
data = Gitlab::DataBuilder::NoteDataBuilder.build(merge_request_note, user)
hipchat.execute(data)
@@ -253,7 +253,7 @@ describe HipchatService, models: true do
note: "issue note")
end
- it "should call Hipchat API for issue comment events" do
+ it "calls Hipchat API for issue comment events" do
data = Gitlab::DataBuilder::NoteDataBuilder.build(issue_note, user)
hipchat.execute(data)
@@ -279,7 +279,7 @@ describe HipchatService, models: true do
note: "snippet note")
end
- it "should call Hipchat API for snippet comment events" do
+ it "calls Hipchat API for snippet comment events" do
data = Gitlab::DataBuilder::NoteDataBuilder.build(snippet_note, user)
hipchat.execute(data)
@@ -307,13 +307,13 @@ describe HipchatService, models: true do
context 'for failed' do
before { build.drop }
- it "should call Hipchat API" do
+ it "calls Hipchat API" do
hipchat.execute(data)
expect(WebMock).to have_requested(:post, api_url).once
end
- it "should create a build message" do
+ it "creates a build message" do
message = hipchat.send(:create_build_message, data)
project_url = project.web_url
@@ -335,13 +335,13 @@ describe HipchatService, models: true do
build.success
end
- it "should call Hipchat API" do
+ it "calls Hipchat API" do
hipchat.notify_only_broken_builds = false
hipchat.execute(data)
expect(WebMock).to have_requested(:post, api_url).once
end
- it "should notify only broken" do
+ it "notifies only broken" do
hipchat.notify_only_broken_builds = true
hipchat.execute(data)
expect(WebMock).not_to have_requested(:post, api_url).once