diff options
author | Sean McGivern <sean@gitlab.com> | 2019-03-14 16:39:22 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-03-14 18:51:56 +0300 |
commit | d8739f9420979856b847c5c48016ec4e973f99fd (patch) | |
tree | 5bce863195aff8e6e9e1f7f94ebdc6b568073ca7 /spec/migrations | |
parent | 8e5bbf8aed0f6743a3a8962ac43a222a6c7be953 (diff) |
Remove factories from MigrateUserProjectView spec
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/migrate_user_project_view_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/migrations/migrate_user_project_view_spec.rb b/spec/migrations/migrate_user_project_view_spec.rb index 80468b9d01e..a0179ab3ceb 100644 --- a/spec/migrations/migrate_user_project_view_spec.rb +++ b/spec/migrations/migrate_user_project_view_spec.rb @@ -3,15 +3,15 @@ require 'spec_helper' require Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_project_view.rb') -describe MigrateUserProjectView, :delete do +describe MigrateUserProjectView, :migration do let(:migration) { described_class.new } - let!(:user) { create(:user, project_view: 'readme') } # rubocop:disable RSpec/FactoriesInMigrationSpecs + let!(:user) { table(:users).create!(project_view: User.project_views['readme']) } describe '#up' do it 'updates project view setting with new value' do migration.up - expect(user.reload.project_view).to eq('files') + expect(user.reload.project_view).to eq(User.project_views['files']) end end end |