2017-08-17 22:00:37 +05:30
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
require Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_project_view.rb')
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
describe MigrateUserProjectView, :delete do
|
2017-08-17 22:00:37 +05:30
|
|
|
let(:migration) { described_class.new }
|
2018-05-09 12:01:36 +05:30
|
|
|
let!(:user) { create(:user, project_view: 'readme') } # rubocop:disable RSpec/FactoriesInMigrationSpecs
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
describe '#up' do
|
|
|
|
it 'updates project view setting with new value' do
|
|
|
|
migration.up
|
|
|
|
|
|
|
|
expect(user.reload.project_view).to eq('files')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|