diff --git a/lib/gitlab/badge/coverage.rb b/lib/gitlab/badge/coverage.rb new file mode 100644 index 0000000000000000000000000000000000000000..94af3a7ec343c6546a8fe0ee9056c3f1d2082dda --- /dev/null +++ b/lib/gitlab/badge/coverage.rb @@ -0,0 +1,17 @@ +module Gitlab + module Badge + ## + # Test coverage badge + # + class Coverage + def initialize(project, ref, job = nil) + @project = project + @ref = ref + @job = job + end + + def coverage + end + end + end +end diff --git a/spec/lib/gitlab/badge/coverage_spec.rb b/spec/lib/gitlab/badge/coverage_spec.rb new file mode 100644 index 0000000000000000000000000000000000000000..343ca3c0f856c244933b4c13df57dd57a1c6c688 --- /dev/null +++ b/spec/lib/gitlab/badge/coverage_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe Gitlab::Badge::Coverage do + let(:project) { create(:project) } + + let(:pipeline) do + create(:ci_pipeline, project: project, + sha: project.commit.id, + ref: 'master') + end + + let(:badge) { described_class.new(project, 'master') } + + context 'builds exist' do + end + + context 'build does not exist' do + end +end