5cb488e8a1
`discussion_id` may not be present when the SELECT call for notes does not include this attribute. Don't attempt to set the discussion ID unless the model contains the attribute. Closes #21119, #21128
12 lines
366 B
Ruby
12 lines
366 B
Ruby
require 'spec_helper'
|
|
|
|
describe Network::Graph, models: true do
|
|
let(:project) { create(:project) }
|
|
let!(:note_on_commit) { create(:note_on_commit, project: project) }
|
|
|
|
it '#initialize' do
|
|
graph = described_class.new(project, 'refs/heads/master', project.repository.commit, nil)
|
|
|
|
expect(graph.notes).to eq( { note_on_commit.commit_id => 1 } )
|
|
end
|
|
end
|