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/graphql/types/ci/job_type_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/graphql/types/ci/job_type_spec.rb')
-rw-r--r-- | spec/graphql/types/ci/job_type_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/graphql/types/ci/job_type_spec.rb b/spec/graphql/types/ci/job_type_spec.rb index bc9e64282bc..b3dee082d1f 100644 --- a/spec/graphql/types/ci/job_type_spec.rb +++ b/spec/graphql/types/ci/job_type_spec.rb @@ -3,6 +3,8 @@ require 'spec_helper' RSpec.describe Types::Ci::JobType do + include GraphqlHelpers + specify { expect(described_class.graphql_name).to eq('CiJob') } specify { expect(described_class).to expose_permissions_using(Types::PermissionTypes::Ci::Job) } @@ -45,8 +47,21 @@ RSpec.describe Types::Ci::JobType do tags triggered userPermissions + webPath ] expect(described_class).to have_graphql_fields(*expected_fields) end + + describe '#web_path' do + subject { resolve_field(:web_path, build, current_user: user, object_type: described_class) } + + let(:project) { create(:project) } + let(:user) { create(:user) } + let(:build) { create(:ci_build, project: project, user: user) } + + it 'returns the web path of the job' do + is_expected.to eq("/#{project.full_path}/-/jobs/#{build.id}") + end + end end |