提交 d8739f94 编写于 作者: S Sean McGivern

Remove factories from MigrateUserProjectView spec

上级 8e5bbf8a
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册