diff options
Diffstat (limited to 'spec/requests/projects/ml/candidates_controller_spec.rb')
-rw-r--r-- | spec/requests/projects/ml/candidates_controller_spec.rb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/spec/requests/projects/ml/candidates_controller_spec.rb b/spec/requests/projects/ml/candidates_controller_spec.rb index 78f31be26d1..0263f2d79b5 100644 --- a/spec/requests/projects/ml/candidates_controller_spec.rb +++ b/spec/requests/projects/ml/candidates_controller_spec.rb @@ -51,13 +51,7 @@ RSpec.describe Projects::Ml::CandidatesController, feature_category: :mlops do end describe 'GET show' do - let(:can_read_build) { true } - before do - allow(Ability).to receive(:allowed?) - .with(user, :read_build, candidate.ci_build) - .and_return(can_read_build) - show_candidate end @@ -74,20 +68,6 @@ RSpec.describe Projects::Ml::CandidatesController, feature_category: :mlops do expect { show_candidate }.not_to exceed_all_query_limit(control_count) end - context 'when user has permission to read the build' do - it 'includes ci build info' do - expect(assigns[:include_ci_info]).to eq(true) - end - end - - context 'when user has no permission to read the build' do - let(:can_read_build) { false } - - it 'sets include_ci_job to false' do - expect(assigns[:include_ci_info]).to eq(false) - end - end - it_behaves_like '404 if candidate does not exist' it_behaves_like 'requires read_model_experiments' end |