diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-27 21:07:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-27 21:07:34 +0300 |
commit | 7dd130e2cae40514f02b02922251b62302f2fdd5 (patch) | |
tree | fd2f91802a2dd2659b72d3767ea9a00786d7900b /spec/requests | |
parent | 9979d2afd66e12d938ea55372dcf2d8105b5eaca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/graphql/mutations/work_items/create_spec.rb | 10 | ||||
-rw-r--r-- | spec/requests/projects/ml/models_controller_spec.rb | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/spec/requests/api/graphql/mutations/work_items/create_spec.rb b/spec/requests/api/graphql/mutations/work_items/create_spec.rb index fca3c84e534..6055390c8d5 100644 --- a/spec/requests/api/graphql/mutations/work_items/create_spec.rb +++ b/spec/requests/api/graphql/mutations/work_items/create_spec.rb @@ -272,6 +272,16 @@ RSpec.describe 'Create a work item', feature_category: :team_planning do let(:mutation) { graphql_mutation(:workItemCreate, input.merge(namespacePath: group.full_path), fields) } it_behaves_like 'creates work item' + + context 'when the namespace_level_work_items feature flag is disabled' do + before do + stub_feature_flags(namespace_level_work_items: false) + end + + it_behaves_like 'a mutation that returns top-level errors', errors: [ + Mutations::WorkItems::Create::DISABLED_FF_ERROR + ] + end end context 'when both projectPath and namespacePath are passed' do diff --git a/spec/requests/projects/ml/models_controller_spec.rb b/spec/requests/projects/ml/models_controller_spec.rb index b57f5db9b68..8569f2396d3 100644 --- a/spec/requests/projects/ml/models_controller_spec.rb +++ b/spec/requests/projects/ml/models_controller_spec.rb @@ -7,6 +7,7 @@ RSpec.describe Projects::Ml::ModelsController, feature_category: :mlops do let_it_be(:user) { project.first_owner } let_it_be(:model1) { create(:ml_models, :with_versions, project: project) } let_it_be(:model2) { create(:ml_models, project: project) } + let_it_be(:model_in_different_project) { create(:ml_models) } let(:model_registry_enabled) { true } @@ -35,10 +36,10 @@ RSpec.describe Projects::Ml::ModelsController, feature_category: :mlops do index_request end - it 'prepares model view using the presenter' do - expect(::Ml::ModelsIndexPresenter).to receive(:new).and_call_original - + it 'fetches the correct models' do index_request + + expect(assigns(:models)).to match_array([model1, model2]) end it 'does not perform N+1 sql queries' do |