blob: 70f8e0d6082c65be53ae1ca593ce58672df23035 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# 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) }
before do
# 0 is the numeric value for the old 'readme' option
user.update_column(:project_view, 0)
end
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
|