From 6e0f8453c0c1bef3dc4d9c1200aaf144011ce42d Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 4 Apr 2016 21:05:51 +0200 Subject: [PATCH] Reload forked_project_link projects This fixes ./spec/services/projects/unlink_fork_service_spec.rb which somehow started failing on the master branch. It certainly isn't a very elegant solution but seems to be the easiest/best way of solving this problem for the time being. --- spec/factories/forked_project_links.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/factories/forked_project_links.rb b/spec/factories/forked_project_links.rb index 252bf2747e1..19a54946fe0 100644 --- a/spec/factories/forked_project_links.rb +++ b/spec/factories/forked_project_links.rb @@ -13,5 +13,10 @@ FactoryGirl.define do factory :forked_project_link do association :forked_to_project, factory: :project association :forked_from_project, factory: :project + + after(:create) do |link| + link.forked_from_project.reload + link.forked_to_project.reload + end end end