diff options
author | Kushal Pandya <kushalspandya@gmail.com> | 2017-03-02 20:57:01 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-03-02 20:57:01 +0300 |
commit | 52352be6be357d30be9760d5b442e97806eb0e10 (patch) | |
tree | d82f3f157d50ca3a59edbd1834ea65aa54d6bc38 /spec/controllers/projects/graphs_controller_spec.rb | |
parent | f14ee823d703119aed8500f3cd868f12bcd103bc (diff) |
Cleaning up navigational order - Project
Diffstat (limited to 'spec/controllers/projects/graphs_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/graphs_controller_spec.rb | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/spec/controllers/projects/graphs_controller_spec.rb b/spec/controllers/projects/graphs_controller_spec.rb index c4a7aa7d63e..049bae1899d 100644 --- a/spec/controllers/projects/graphs_controller_spec.rb +++ b/spec/controllers/projects/graphs_controller_spec.rb @@ -9,7 +9,23 @@ describe Projects::GraphsController do project.team << [user, :master] end - describe 'GET #languages' do + describe 'GET languages' do + it "redirects_to action charts" do + get(:commits, namespace_id: project.namespace.path, project_id: project.path, id: 'master') + + expect(response).to redirect_to action: :charts + end + end + + describe 'GET commits' do + it "redirects_to action charts" do + get(:commits, namespace_id: project.namespace.path, project_id: project.path, id: 'master') + + expect(response).to redirect_to action: :charts + end + end + + describe 'GET charts' do let(:linguist_repository) do double(languages: { 'Ruby' => 1000, @@ -34,7 +50,7 @@ describe Projects::GraphsController do end it 'sets the correct colour according to language' do - get(:languages, namespace_id: project.namespace, project_id: project, id: 'master') + 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)) |