gitlab-org--gitlab-foss/spec/migrations/migrate_user_project_view_spec.rb
Dmitriy Zaporozhets e585b77730 Change project view default for existing users and anonymous visitors to files+readme
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-04-10 21:28:41 +03:00

17 lines
437 B
Ruby

# encoding: utf-8
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_project_view.rb')
describe MigrateUserProjectView do
let(:migration) { described_class.new }
let!(:user) { create(:user, project_view: 'readme') }
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