Commit 1d5c7429 authored by Felipe Artur's avatar Felipe Artur

Fix failing specs from backports

parent 1eb50566
......@@ -294,7 +294,7 @@ module API
merge_request = user_project.merge_requests.find(params[:merge_request_id])
authorize! :read_merge_request, merge_request
present merge_request, with: Entities::MergeRequestApprovals, current_user: current_user
present merge_request, with: ::API::Entities::MergeRequestApprovals, current_user: current_user
end
# Approve a merge request
......@@ -314,7 +314,7 @@ module API
.new(user_project, current_user)
.execute(merge_request)
present merge_request, with: Entities::MergeRequestApprovals, current_user: current_user
present merge_request, with: ::API::Entities::MergeRequestApprovals, current_user: current_user
end
delete "#{path}/unapprove" do
......@@ -326,7 +326,7 @@ module API
.new(user_project, current_user)
.execute(merge_request)
present merge_request, with: Entities::MergeRequestApprovals, current_user: current_user
present merge_request, with: ::API::Entities::MergeRequestApprovals, current_user: current_user
end
end
end
......
......@@ -783,13 +783,13 @@ describe SystemNoteService, services: true do
it 'sets the note text' do
noteable.update_attribute(:time_estimate, 277200)
expect(subject.note).to eq "Changed time estimate of this issue to 1w 4d 5h"
expect(subject.note).to eq "changed time estimate to 1w 4d 5h"
end
end
context 'without a time estimate' do
it 'sets the note text' do
expect(subject.note).to eq "Removed time estimate on this issue"
expect(subject.note).to eq "removed time estimate"
end
end
end
......@@ -813,7 +813,7 @@ describe SystemNoteService, services: true do
it 'sets the note text' do
spend_time!(277200)
expect(subject.note).to eq "Added 1w 4d 5h of time spent on this merge request"
expect(subject.note).to eq "added 1w 4d 5h of time spent"
end
end
......@@ -821,7 +821,7 @@ describe SystemNoteService, services: true do
it 'sets the note text' do
spend_time!(-277200)
expect(subject.note).to eq "Subtracted 1w 4d 5h of time spent on this merge request"
expect(subject.note).to eq "subtracted 1w 4d 5h of time spent"
end
end
......@@ -829,7 +829,7 @@ describe SystemNoteService, services: true do
it 'sets the note text' do
spend_time!(:reset)
expect(subject.note).to eq "Removed time spent on this merge request"
expect(subject.note).to eq "removed time spent"
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment