summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-05-03 10:54:06 -0700
committerMichael Kozono <mkozono@gmail.com>2017-05-05 12:11:58 -0700
commite8f2a7007a96d19cf7f7e7278bf21007fafa9f1c (patch)
treef6127d3ae7e1a022e12143771f12b51cfaaafa66
parentca5c762cf577838a98c0ba96ce20b5f1d5dafc91 (diff)
downloadgitlab-ce-e8f2a7007a96d19cf7f7e7278bf21007fafa9f1c.tar.gz
Fix or workaround spec failure
Not sure why this fixes this error: ``` ActiveRecord::RecordNotUnique:  PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_routes_on_source_type_and_source_id"  DETAIL: Key (source_type, source_id)=(Project, 1) already exists.  : INSERT INTO "routes" ("source_type", "path", "name", "source_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" ```
-rw-r--r--spec/features/projects/project_settings_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/features/projects/project_settings_spec.rb b/spec/features/projects/project_settings_spec.rb
index c0311e73ef5..11dcab4d737 100644
--- a/spec/features/projects/project_settings_spec.rb
+++ b/spec/features/projects/project_settings_spec.rb
@@ -93,8 +93,8 @@ describe 'Edit Project Settings', feature: true do
describe 'Transfer project section', js: true do
# Not using empty project because we need a repo to exist
- let(:project) { create(:project, namespace: user.namespace, name: 'gitlabhq') }
- let(:group) { create(:group) }
+ let!(:project) { create(:project, namespace: user.namespace, name: 'gitlabhq') }
+ let!(:group) { create(:group) }
before(:context) { TestEnv.clean_test_path }
before(:example) { group.add_owner(user) }