diff options
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/cleanup_empty_commit_user_mentions_spec.rb | 2 | ||||
-rw-r--r-- | spec/migrations/migrate_commit_notes_mentions_to_db_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/migrations/cleanup_empty_commit_user_mentions_spec.rb b/spec/migrations/cleanup_empty_commit_user_mentions_spec.rb index 7e6afbec520..529fe046e32 100644 --- a/spec/migrations/cleanup_empty_commit_user_mentions_spec.rb +++ b/spec/migrations/cleanup_empty_commit_user_mentions_spec.rb @@ -14,7 +14,7 @@ describe CleanupEmptyCommitUserMentions, :migration, :sidekiq do let(:project) { projects.create!(name: 'gitlab1', path: 'gitlab1', namespace_id: group.id, visibility_level: 0) } let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } - let(:commit) { Commit.new(RepoHelpers.sample_commit, project.becomes(Project)) } + let(:commit) { Commit.new(RepoHelpers.sample_commit, project) } let(:commit_user_mentions) { table(:commit_user_mentions) } let!(:resource1) { notes.create!(commit_id: commit.id, noteable_type: 'Commit', project_id: project.id, author_id: user.id, note: 'note1 for @root to check') } diff --git a/spec/migrations/migrate_commit_notes_mentions_to_db_spec.rb b/spec/migrations/migrate_commit_notes_mentions_to_db_spec.rb index aa78381ba3a..dc40d0865f2 100644 --- a/spec/migrations/migrate_commit_notes_mentions_to_db_spec.rb +++ b/spec/migrations/migrate_commit_notes_mentions_to_db_spec.rb @@ -14,7 +14,7 @@ describe MigrateCommitNotesMentionsToDb, :migration, :sidekiq do let(:project) { projects.create!(name: 'gitlab1', path: 'gitlab1', namespace_id: group.id, visibility_level: 0) } let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } - let(:commit) { Commit.new(RepoHelpers.sample_commit, project.becomes(Project)) } + let(:commit) { Commit.new(RepoHelpers.sample_commit, project) } let(:commit_user_mentions) { table(:commit_user_mentions) } let!(:resource1) { notes.create!(commit_id: commit.id, noteable_type: 'Commit', project_id: project.id, author_id: user.id, note: 'note1 for @root to check') } |