debian-mirror-gitlab/spec/migrations/migrate_user_project_view_spec.rb

18 lines
497 B
Ruby
Raw Normal View History

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')
2019-05-18 00:54:41 +05:30
describe MigrateUserProjectView, :migration do
2017-08-17 22:00:37 +05:30
let(:migration) { described_class.new }
2019-05-18 00:54:41 +05:30
let!(:user) { table(:users).create!(project_view: User.project_views['readme']) }
2017-08-17 22:00:37 +05:30
describe '#up' do
it 'updates project view setting with new value' do
migration.up
2019-05-18 00:54:41 +05:30
expect(user.reload.project_view).to eq(User.project_views['files'])
2017-08-17 22:00:37 +05:30
end
end
end