Commit 1245cccf authored by Sean McGivern's avatar Sean McGivern Committed by Ruben Davila

Use `table` helper in migration specs

parent cd84ce1a
...@@ -222,6 +222,7 @@ describe Gitlab::BackgroundMigration::MigrateEventsToPushEventPayloads, :migrati ...@@ -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' ...@@ -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
[ [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment