diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/finders/environments | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/finders/environments')
-rw-r--r-- | spec/finders/environments/environments_finder_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/finders/environments/environments_finder_spec.rb b/spec/finders/environments/environments_finder_spec.rb index 71d10ceb5d3..04fbd4067b4 100644 --- a/spec/finders/environments/environments_finder_spec.rb +++ b/spec/finders/environments/environments_finder_spec.rb @@ -6,8 +6,8 @@ RSpec.describe Environments::EnvironmentsFinder do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { project.creator } let_it_be(:environment) { create(:environment, :available, project: project) } - let_it_be(:environment_stopped) { create(:environment, :stopped, name: 'test2', project: project) } - let_it_be(:environment_available) { create(:environment, :available, name: 'test3', project: project) } + let_it_be(:environment_stopped) { create(:environment, :stopped, name: 'test/test2', project: project) } + let_it_be(:environment_available) { create(:environment, :available, name: 'test/test3', project: project) } before do project.add_maintainer(user) @@ -65,5 +65,11 @@ RSpec.describe Environments::EnvironmentsFinder do expect(result).to contain_exactly(environment_available) end end + + it 'filters environments by type' do + result = described_class.new(project, user, type: 'test').execute + + expect(result).to contain_exactly(environment_stopped, environment_available) + end end end |