2018-11-08 19:23:39 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Projects::CommitController, '(JavaScript fixtures)', type: :controller do
|
|
|
|
include JavaScriptFixturesHelpers
|
|
|
|
|
|
|
|
set(:project) { create(:project, :repository) }
|
|
|
|
set(:user) { create(:user) }
|
|
|
|
let(:commit) { project.commit("master") }
|
|
|
|
|
|
|
|
render_views
|
|
|
|
|
|
|
|
before(:all) do
|
|
|
|
clean_frontend_fixtures('commit/')
|
|
|
|
end
|
|
|
|
|
|
|
|
before do
|
2018-11-18 11:00:15 +05:30
|
|
|
project.add_maintainer(user)
|
2018-11-08 19:23:39 +05:30
|
|
|
sign_in(user)
|
2019-07-07 11:18:12 +05:30
|
|
|
allow(SecureRandom).to receive(:hex).and_return('securerandomhex:thereisnospoon')
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
|
|
|
|
2019-09-04 21:01:54 +05:30
|
|
|
it 'commit/show.html' do
|
2018-11-08 19:23:39 +05:30
|
|
|
params = {
|
|
|
|
namespace_id: project.namespace,
|
|
|
|
project_id: project,
|
|
|
|
id: commit.id
|
|
|
|
}
|
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
get :show, params: params
|
2018-11-08 19:23:39 +05:30
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
expect(response).to be_successful
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
|
|
|
end
|