Commit cec77404 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'fix/events-broken-after-importing-gitlab-export-project' into 'master'

Fix user activity page crash after importing gitlab export project

See merge request gitlab-org/gitlab!81417
parents c999069b dca6194c
......@@ -370,6 +370,7 @@ included_attributes:
- :name
- :email
events:
- :project_id
- :target_type
- :action
- :author_id
......
......@@ -401,4 +401,20 @@ RSpec.describe Gitlab::ImportExport::Project::RelationFactory, :use_clean_rails_
expect(created_object.value).to be_nil
end
end
context 'event object' do
let(:relation_sym) { :events }
let(:relation_hash) do
{
'project_id' => project.id,
'author_id' => admin.id,
'action' => 'created',
'target_type' => 'Issue'
}
end
it 'has preloaded project' do
expect(created_object.project).to equal(project)
end
end
end
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