Use table
helper in migration specs
This commit is contained in:
parent
cd84ce1a1b
commit
1245cccf68
2 changed files with 2 additions and 5 deletions
|
@ -222,6 +222,7 @@ describe Gitlab::BackgroundMigration::MigrateEventsToPushEventPayloads, :migrati
|
||||||
end
|
end
|
||||||
|
|
||||||
let(:migration) { described_class.new }
|
let(:migration) { described_class.new }
|
||||||
|
let(:user_class) { table(:users) }
|
||||||
let(:author) { build(:user).becomes(user_class).tap(&:save!).becomes(User) }
|
let(:author) { build(:user).becomes(user_class).tap(&:save!).becomes(User) }
|
||||||
let(:namespace) { create(:namespace, owner: author) }
|
let(:namespace) { create(:namespace, owner: author) }
|
||||||
let(:project) { create(:project_empty_repo, namespace: namespace, creator: author) }
|
let(:project) { create(:project_empty_repo, namespace: namespace, creator: author) }
|
||||||
|
|
|
@ -2,11 +2,7 @@ require 'spec_helper'
|
||||||
require Rails.root.join('db', 'post_migrate', '20170607121233_convert_custom_notification_settings_to_columns')
|
require Rails.root.join('db', 'post_migrate', '20170607121233_convert_custom_notification_settings_to_columns')
|
||||||
|
|
||||||
describe ConvertCustomNotificationSettingsToColumns, :migration do
|
describe ConvertCustomNotificationSettingsToColumns, :migration do
|
||||||
let(:user_class) do
|
let(:user_class) { table(:users) }
|
||||||
Class.new(ActiveRecord::Base) do
|
|
||||||
self.table_name = 'users'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
let(:settings_params) do
|
let(:settings_params) do
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in a new issue