push
circleci
11 of 34 new or added lines in 4 files covered. (32.35%)
451 existing lines in 34 files now uncovered.935 of 1553 relevant lines covered (60.21%)
9.47 hits per line
| 1 |
# frozen_string_literal: true
|
|
| 2 |
module Mediaflux |
1✔ |
| 3 |
module Http |
1✔ |
| 4 |
class CreateTokenRequest < Request |
1✔ |
| 5 |
# Specifies the logon service within the Mediaflux API
|
|
| 6 |
# @return [String]
|
|
| 7 |
def self.service |
1✔ |
|
UNCOV
8
|
"secure.identity.token.create"
|
× |
| 9 |
end
|
|
| 10 |
|
|
| 11 |
def initialize(session_token:, domain:, user:) |
1✔ |
| 12 |
@domain = domain
|
1✔ |
| 13 |
@user = user
|
1✔ |
| 14 |
super(session_token: session_token) |
1✔ |
| 15 |
end
|
|
| 16 |
|
|
| 17 |
def identity |
1✔ |
|
UNCOV
18
|
@id ||= response_xml.xpath("/response/reply/result/token").text.strip |
× |
|
UNCOV
19
|
@id
|
× |
| 20 |
end
|
|
| 21 |
|
|
| 22 |
private |
1✔ |
| 23 |
|
|
| 24 |
def build_http_request_body(name:) |
1✔ |
|
UNCOV
25
|
super do |xml| |
× |
|
UNCOV
26
|
xml.args do
|
× |
|
UNCOV
27
|
xml.identity do
|
× |
|
UNCOV
28
|
xml.send("grant-user-roles", true) |
× |
|
UNCOV
29
|
xml.domain @domain
|
× |
|
UNCOV
30
|
xml.user @user
|
× |
| 31 |
end
|
|
| 32 |
end
|
|
| 33 |
end
|
|
| 34 |
end
|
|
| 35 |
end
|
|
| 36 |
end
|
|
| 37 |
end
|