diff --git a/Tests/Functions/ConvertTo-JiraCreateMetaField.Unit.Tests.ps1 b/Tests/Functions/ConvertTo-JiraCreateMetaField.Unit.Tests.ps1 index d2e79995..3b8b431b 100644 --- a/Tests/Functions/ConvertTo-JiraCreateMetaField.Unit.Tests.ps1 +++ b/Tests/Functions/ConvertTo-JiraCreateMetaField.Unit.Tests.ps1 @@ -39,71 +39,62 @@ Describe "ConvertTo-JiraCreateMetaField" -Tag 'Unit' { $sampleJson = @' { - "expand": "projects", - "projects": [ + "values": [ { - "expand": "issuetypes", - "issuetypes": [ + "required": true, + "schema": { + "type": "string", + "system": "summary" + }, + "name": "Summary", + "fieldId": "summary", + "hasDefaultValue": false, + "operations": [ + "set" + ] + }, + { + "required": false, + "schema": { + "type": "priority", + "system": "priority" + }, + "name": "Priority", + "fieldId": "priority", + "hasDefaultValue": true, + "operations": [ + "set" + ], + "allowedValues": [ + { + "self": "http://jiraserver.example.com/rest/api/2/priority/1", + "iconUrl": "http://jiraserver.example.com/images/icons/priorities/blocker.png", + "name": "Block", + "id": "1" + }, + { + "self": "http://jiraserver.example.com/rest/api/2/priority/2", + "iconUrl": "http://jiraserver.example.com/images/icons/priorities/critical.png", + "name": "Critical", + "id": "2" + }, + { + "self": "http://jiraserver.example.com/rest/api/2/priority/3", + "iconUrl": "http://jiraserver.example.com/images/icons/priorities/major.png", + "name": "Major", + "id": "3" + }, + { + "self": "http://jiraserver.example.com/rest/api/2/priority/4", + "iconUrl": "http://jiraserver.example.com/images/icons/priorities/minor.png", + "name": "Minor", + "id": "4" + }, { - "expand": "fields", - "fields": { - "summary": { - "required": true, - "schema": { - "type": "string", - "system": "summary" - }, - "name": "Summary", - "hasDefaultValue": false, - "operations": [ - "set" - ] - }, - "priority": { - "required": false, - "schema": { - "type": "priority", - "system": "priority" - }, - "name": "Priority", - "hasDefaultValue": true, - "operations": [ - "set" - ], - "allowedValues": [ - { - "self": "http://jiraserver.example.com/rest/api/2/priority/1", - "iconUrl": "http://jiraserver.example.com/images/icons/priorities/blocker.png", - "name": "Block", - "id": "1" - }, - { - "self": "http://jiraserver.example.com/rest/api/2/priority/2", - "iconUrl": "http://jiraserver.example.com/images/icons/priorities/critical.png", - "name": "Critical", - "id": "2" - }, - { - "self": "http://jiraserver.example.com/rest/api/2/priority/3", - "iconUrl": "http://jiraserver.example.com/images/icons/priorities/major.png", - "name": "Major", - "id": "3" - }, - { - "self": "http://jiraserver.example.com/rest/api/2/priority/4", - "iconUrl": "http://jiraserver.example.com/images/icons/priorities/minor.png", - "name": "Minor", - "id": "4" - }, - { - "self": "http://jiraserver.example.com/rest/api/2/priority/5", - "iconUrl": "http://jiraserver.example.com/images/icons/priorities/trivial.png", - "name": "Trivial", - "id": "5" - } - ] - } - } + "self": "http://jiraserver.example.com/rest/api/2/priority/5", + "iconUrl": "http://jiraserver.example.com/images/icons/priorities/trivial.png", + "name": "Trivial", + "id": "5" } ] }