diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-04-06 17:52:15 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-04-10 21:28:41 +0300 |
commit | e585b77730b2a38173453bb5e437628fe6eb9844 (patch) | |
tree | dc17cbc02181b3fe8d987ba79226d05a4d4d650c /spec/migrations | |
parent | 0b5a8a34e0b7851957b976a8151a7d6acf8b9f69 (diff) | |
download | gitlab-ce-e585b77730b2a38173453bb5e437628fe6eb9844.tar.gz |
Change project view default for existing users and anonymous visitors to files+readmedz-fix-project-view
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/migrate_user_project_view_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/migrations/migrate_user_project_view_spec.rb b/spec/migrations/migrate_user_project_view_spec.rb new file mode 100644 index 00000000000..dacaa834aa9 --- /dev/null +++ b/spec/migrations/migrate_user_project_view_spec.rb @@ -0,0 +1,17 @@ +# 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 |