Commit d8739f94 authored by Sean McGivern's avatar Sean McGivern

Remove factories from MigrateUserProjectView spec

parent 8e5bbf8a
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
require 'spec_helper' require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_project_view.rb') 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(: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 describe '#up' do
it 'updates project view setting with new value' do it 'updates project view setting with new value' do
migration.up migration.up
expect(user.reload.project_view).to eq('files') expect(user.reload.project_view).to eq(User.project_views['files'])
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment