2017-04-06 10:52:15 -04:00
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
require Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_project_view.rb')
|
|
|
|
|
2017-06-22 06:35:47 -04:00
|
|
|
describe MigrateUserProjectView, :truncate do
|
2017-04-06 10:52:15 -04:00
|
|
|
let(:migration) { described_class.new }
|
2017-10-16 16:21:51 -04:00
|
|
|
let!(:user) { create(:user, project_view: 'readme') }
|
2017-04-06 10:52:15 -04:00
|
|
|
|
|
|
|
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
|