ignore the column before the migration

reword the changelog
remove dead code in the specs
This commit is contained in:
micael.bergeron 2017-11-06 09:03:11 -05:00
parent 6c1c64d4bb
commit bb0543ef47
5 changed files with 5 additions and 8 deletions

View file

@ -8,7 +8,8 @@ class MergeRequest < ActiveRecord::Base
include CreatedAtFilterable include CreatedAtFilterable
include TimeTrackable include TimeTrackable
ignore_column :locked_at ignore_column :locked_at,
:ref_fetched
belongs_to :target_project, class_name: "Project" belongs_to :target_project, class_name: "Project"
belongs_to :source_project, class_name: "Project" belongs_to :source_project, class_name: "Project"

View file

@ -1,5 +1,5 @@
--- ---
title: Removed merge requests fetching their refs on every action. title: Stop merge requests from fetching their refs when the data is already available.
merge_request: 15129 merge_request: 15129
author: author:
type: removed type: removed

View file

@ -83,10 +83,10 @@ FactoryGirl.define do
target_project = merge_request.target_project target_project = merge_request.target_project
source_project = merge_request.source_project source_project = merge_request.source_project
# Fake `write_ref` if we don't have repository # Fake `fetch_ref!` if we don't have repository
# We have too many existing tests replying on this behaviour # We have too many existing tests replying on this behaviour
unless [target_project, source_project].all?(&:repository_exists?) unless [target_project, source_project].all?(&:repository_exists?)
allow(merge_request).to receive(:write_ref) allow(merge_request).to receive(:fetch_ref!)
end end
end end

View file

@ -623,8 +623,6 @@ describe API::MergeRequests do
before do before do
forked_project.add_reporter(user2) forked_project.add_reporter(user2)
allow_any_instance_of(MergeRequest).to receive(:write_ref)
end end
it "returns merge_request" do it "returns merge_request" do

View file

@ -319,8 +319,6 @@ describe API::MergeRequests do
before do before do
forked_project.add_reporter(user2) forked_project.add_reporter(user2)
allow_any_instance_of(MergeRequest).to receive(:write_ref)
end end
it "returns merge_request" do it "returns merge_request" do