diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-01-07 14:30:08 +0300 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-01-07 14:30:08 +0300 |
commit | 1fbeaa068489373ac9e018f6e5e99ff54caf50bb (patch) | |
tree | dbab65a5372526060d5c1313f489b383efd04f4f /spec | |
parent | fd100e381a1b9f36830813d7b4549cbbb2562773 (diff) | |
parent | de6256ee67f8b5a8623d8a4c510f5181d0d492db (diff) |
Merge branch 'master' into update_api_messages
Conflicts:
CHANGELOG
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/atom/users_spec.rb | 9 | ||||
-rw-r--r-- | spec/services/merge_requests/refresh_service_spec.rb | 8 |
2 files changed, 11 insertions, 6 deletions
diff --git a/spec/features/atom/users_spec.rb b/spec/features/atom/users_spec.rb index 746b6fc1ac9..de4f94fff2f 100644 --- a/spec/features/atom/users_spec.rb +++ b/spec/features/atom/users_spec.rb @@ -24,11 +24,12 @@ describe "User Feed", feature: true do end it "should have issue opened event" do - body.should have_content("#{user.name} opened issue ##{issue.iid}") + expect(body).to have_content("#{safe_name} opened issue ##{issue.iid}") end it "should have issue comment event" do - body.should have_content("#{user.name} commented on issue ##{issue.iid}") + expect(body). + to have_content("#{safe_name} commented on issue ##{issue.iid}") end end end @@ -40,4 +41,8 @@ describe "User Feed", feature: true do def note_event(note, user) EventCreateService.new.leave_note(note, user) end + + def safe_name + html_escape(user.name) + end end diff --git a/spec/services/merge_requests/refresh_service_spec.rb b/spec/services/merge_requests/refresh_service_spec.rb index 9f294152053..35c7aac94df 100644 --- a/spec/services/merge_requests/refresh_service_spec.rb +++ b/spec/services/merge_requests/refresh_service_spec.rb @@ -47,10 +47,10 @@ describe MergeRequests::RefreshService do reload_mrs end - it { @merge_request.notes.should be_empty } + it { @merge_request.notes.last.note.should include('changed to merged') } it { @merge_request.should be_merged } it { @fork_merge_request.should be_merged } - it { @fork_merge_request.notes.should be_empty } + it { @fork_merge_request.notes.last.note.should include('changed to merged') } end context 'push to fork repo source branch' do @@ -61,7 +61,7 @@ describe MergeRequests::RefreshService do it { @merge_request.notes.should be_empty } it { @merge_request.should be_open } - it { @fork_merge_request.notes.should_not be_empty } + it { @fork_merge_request.notes.last.note.should include('new commit') } it { @fork_merge_request.should be_open } end @@ -84,7 +84,7 @@ describe MergeRequests::RefreshService do reload_mrs end - it { @merge_request.notes.should be_empty } + it { @merge_request.notes.last.note.should include('changed to merged') } it { @merge_request.should be_merged } it { @fork_merge_request.should be_open } it { @fork_merge_request.notes.should be_empty } |