Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2018-10-15 11:58:13 +0300
committerToon Claes <toon@gitlab.com>2018-11-28 00:48:55 +0300
commit1f2c9915f6f3dded3fc578324d840919625c26df (patch)
treee831a5c7c6006031575da1fd93686c93ae0d0999 /spec/migrations
parentffdb3f26e7f8f9b62fd32b52c30edf167c760793 (diff)
Make it only run the associated migration
Diffstat (limited to 'spec/migrations')
-rw-r--r--spec/migrations/migrate_issues_to_ghost_user_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/migrations/migrate_issues_to_ghost_user_spec.rb b/spec/migrations/migrate_issues_to_ghost_user_spec.rb
index 9220b49a736..0016f058a17 100644
--- a/spec/migrations/migrate_issues_to_ghost_user_spec.rb
+++ b/spec/migrations/migrate_issues_to_ghost_user_spec.rb
@@ -18,33 +18,33 @@ describe MigrateIssuesToGhostUser, :migration do
let!(:ghost) { users.create(ghost: true, email: 'ghost@example.com') }
it 'does not create a new user' do
- expect { schema_migrate_up! }.not_to change { User.count }
+ expect { migrate! }.not_to change { User.count }
end
it 'migrates issues where author = nil to the ghost user' do
- schema_migrate_up!
+ migrate!
expect(issues.first.reload.author_id).to eq(ghost.id)
end
it 'does not change issues authored by an existing user' do
- expect { schema_migrate_up! }.not_to change { issues.second.reload.author_id}
+ expect { migrate! }.not_to change { issues.second.reload.author_id}
end
end
context 'when ghost user does not exist' do
it 'creates a new user' do
- expect { schema_migrate_up! }.to change { User.count }.by(1)
+ expect { migrate! }.to change { User.count }.by(1)
end
it 'migrates issues where author = nil to the ghost user' do
- schema_migrate_up!
+ migrate!
expect(issues.first.reload.author_id).to eq(User.ghost.id)
end
it 'does not change issues authored by an existing user' do
- expect { schema_migrate_up! }.not_to change { issues.second.reload.author_id}
+ expect { migrate! }.not_to change { issues.second.reload.author_id}
end
end
end