debian-mirror-gitlab/spec/controllers/projects/graphs_controller_spec.rb

28 lines
716 B
Ruby
Raw Normal View History

2016-11-03 12:29:30 +05:30
require 'spec_helper'
describe Projects::GraphsController do
2017-08-17 22:00:37 +05:30
let(:project) { create(:project, :repository) }
2016-11-03 12:29:30 +05:30
let(:user) { create(:user) }
before do
sign_in(user)
2018-11-18 11:00:15 +05:30
project.add_maintainer(user)
2016-11-03 12:29:30 +05:30
end
2017-08-17 22:00:37 +05:30
describe 'GET languages' do
it "redirects_to action charts" do
2019-02-15 15:39:39 +05:30
get(:commits, params: { namespace_id: project.namespace.path, project_id: project.path, id: 'master' })
2017-08-17 22:00:37 +05:30
expect(response).to redirect_to action: :charts
end
end
describe 'GET commits' do
it "redirects_to action charts" do
2019-02-15 15:39:39 +05:30
get(:commits, params: { namespace_id: project.namespace.path, project_id: project.path, id: 'master' })
2017-08-17 22:00:37 +05:30
expect(response).to redirect_to action: :charts
end
end
2016-11-03 12:29:30 +05:30
end