summaryrefslogtreecommitdiff
path: root/qa/qa/resource/label.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/resource/label.rb')
-rw-r--r--qa/qa/resource/label.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/qa/qa/resource/label.rb b/qa/qa/resource/label.rb
index 7c899db31f3..94cb12ac9b6 100644
--- a/qa/qa/resource/label.rb
+++ b/qa/qa/resource/label.rb
@@ -34,6 +34,27 @@ module QA
page.click_label_create_button
end
end
+
+ def resource_web_url(resource)
+ super
+ rescue ResourceURLMissingError
+ # this particular resource does not expose a web_url property
+ end
+
+ def api_get_path
+ raise NotImplementedError, "The Labels API doesn't expose a single-resource endpoint so this method cannot be properly implemented."
+ end
+
+ def api_post_path
+ "/projects/#{project}/labels"
+ end
+
+ def api_post_body
+ {
+ name: @title,
+ color: @color
+ }
+ end
end
end
end