fluke/devops-service/tests/tag.rb
GGA Software Services LLC 02bf8b1bba initial commit
2014-05-08 17:06:06 +04:00

34 lines
599 B
Ruby

require "devops_test"
require "list_command"
require "cud_command"
class Tag < DevopsTest
include ListCommand
include CudCommand
def title
"Tag test"
end
def run
self.username = USERNAME
self.get("tags")
self.check_status 404
list("tags/foo", nil, 404)
self.username = USERNAME
tags = {
:tags => ["tag1"]
}
test_headers "tags/foo"
test_request "tags/foo", tags
test_auth "tags/foo", tags
test_headers "tags/foo", "delete"
test_request "tags/foo", tags, "delete", Hash
test_auth "tags/foo", tags, 400, "delete"
end
end