summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-04-04 21:05:51 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2016-04-04 21:05:51 +0200
commit6e0f8453c0c1bef3dc4d9c1200aaf144011ce42d (patch)
treeffd5bd13b74648aac851ed8091ec53715866e98c
parentd5169a60d44f278614ba7970b737461ffbb8a1ea (diff)
downloadgitlab-ce-6e0f8453c0c1bef3dc4d9c1200aaf144011ce42d.tar.gz
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.
-rw-r--r--spec/factories/forked_project_links.rb5
1 files changed, 5 insertions, 0 deletions
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