summaryrefslogtreecommitdiff
path: root/qa/qa/resource/group_label.rb
blob: d512dfc6a8998ffa2adc5b697a8016d869412ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

module QA
  module Resource
    class GroupLabel < LabelBase
      attribute :group do
        Group.fabricate! do |resource|
          resource.name = 'group-with-label'
        end
      end

      def fabricate!
        raise NotImplementedError
      end

      def api_post_path
        "/groups/#{CGI.escape(group.full_path)}/labels"
      end

      def api_get_path
        "/groups/#{CGI.escape(group.full_path)}/labels/#{id}"
      end
    end
  end
end