summaryrefslogtreecommitdiff
path: root/spec/controllers/projects
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-07-31 15:23:05 +0200
committerJacob Vosmaer <jacob@gitlab.com>2017-08-01 10:48:46 +0200
commit67de82cf5fa5a6408621cbf955c730e2825d9c39 (patch)
tree82b65479cc85b0426d09045d88f6d68d09cdcaf7 /spec/controllers/projects
parente99564568b2fefab8973ce571594aaa888cf8494 (diff)
downloadgitlab-ce-67de82cf5fa5a6408621cbf955c730e2825d9c39.tar.gz
Add option to use CommitLanguages RPC
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/graphs_controller_spec.rb33
1 files changed, 0 insertions, 33 deletions
diff --git a/spec/controllers/projects/graphs_controller_spec.rb b/spec/controllers/projects/graphs_controller_spec.rb
index e0de62e4454..5af03ae118c 100644
--- a/spec/controllers/projects/graphs_controller_spec.rb
+++ b/spec/controllers/projects/graphs_controller_spec.rb
@@ -24,37 +24,4 @@ describe Projects::GraphsController do
expect(response).to redirect_to action: :charts
end
end
-
- describe 'GET charts' do
- let(:linguist_repository) do
- double(languages: {
- 'Ruby' => 1000,
- 'CoffeeScript' => 350,
- 'NSIS' => 15
- })
- end
-
- let(:expected_values) do
- nsis_color = "##{Digest::SHA256.hexdigest('NSIS')[0...6]}"
- [
- # colors from Linguist:
- { label: "Ruby", color: "#701516", highlight: "#701516" },
- { label: "CoffeeScript", color: "#244776", highlight: "#244776" },
- # colors from SHA256 fallback:
- { label: "NSIS", color: nsis_color, highlight: nsis_color }
- ]
- end
-
- before do
- allow(Linguist::Repository).to receive(:new).and_return(linguist_repository)
- end
-
- it 'sets the correct colour according to language' do
- get(:charts, namespace_id: project.namespace, project_id: project, id: 'master')
-
- expected_values.each do |val|
- expect(assigns(:languages)).to include(a_hash_including(val))
- end
- end
- end
end