Skip to content

Commit

Permalink
Update ConvertTo-JiraCreateMetaField.Unit.Tests.ps1
Browse files Browse the repository at this point in the history
Altered test data to match what is returned by new createmeta call.
  • Loading branch information
robertmbaker authored Oct 9, 2023
1 parent 007e0c0 commit ce76cea
Showing 1 changed file with 54 additions and 63 deletions.
117 changes: 54 additions & 63 deletions Tests/Functions/ConvertTo-JiraCreateMetaField.Unit.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand Down

0 comments on commit ce76cea

Please sign in to comment.