BigW Consortium Gitlab

migrate_user_project_view_spec.rb 448 Bytes
Newer Older
1 2 3 4 5
# encoding: utf-8

require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20170406142253_migrate_user_project_view.rb')

6
describe MigrateUserProjectView, :truncate do
7
  let(:migration) { described_class.new }
8
  let!(:user) { create(:user, project_view: 'readme') }
9 10 11 12 13 14 15 16 17

  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