2016-08-20 12:18:06 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Network::Graph, models: true do
|
2017-01-26 17:44:58 -05:00
|
|
|
let(:project) { create(:project, :repository) }
|
2016-08-20 12:18:06 -04:00
|
|
|
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
|