Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Jul 3, 2019
1 parent 1abd039 commit d3da019
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ class EntityDescriptorControllerTests extends Specification {
"relyingPartyOverrides": null,
"attributeRelease": null,
"version": $version,
"createdBy": null
"createdBy": null,
"current": false
}
]
"""
Expand Down Expand Up @@ -202,7 +203,8 @@ class EntityDescriptorControllerTests extends Specification {
"relyingPartyOverrides": null,
"attributeRelease": null,
"version": $versionOne,
"createdBy": null
"createdBy": null,
"current": false
},
{
"id": "uuid-2",
Expand All @@ -221,7 +223,8 @@ class EntityDescriptorControllerTests extends Specification {
"relyingPartyOverrides": null,
"attributeRelease": null,
"version": $versionTwo,
"createdBy": null
"createdBy": null,
"current": false
}
]
"""
Expand Down Expand Up @@ -273,7 +276,8 @@ class EntityDescriptorControllerTests extends Specification {
"relyingPartyOverrides": null,
"attributeRelease": null,
"version": $versionOne,
"createdBy": "someUser"
"createdBy": "someUser",
"current": false
}
]
"""
Expand Down Expand Up @@ -325,7 +329,8 @@ class EntityDescriptorControllerTests extends Specification {
"securityInfo": null,
"assertionConsumerServices": null,
"relyingPartyOverrides": null,
"attributeRelease": null
"attributeRelease": null,
"current": false
}
"""

Expand All @@ -348,7 +353,8 @@ class EntityDescriptorControllerTests extends Specification {
"relyingPartyOverrides": null,
"attributeRelease": null,
"version": $version,
"createdBy": null
"createdBy": null,
"current": false
}
"""

Expand Down Expand Up @@ -504,7 +510,8 @@ class EntityDescriptorControllerTests extends Specification {
"relyingPartyOverrides": null,
"attributeRelease": null,
"version": $version,
"createdBy": null
"createdBy": null,
"current": false
}
"""

Expand Down Expand Up @@ -556,7 +563,8 @@ class EntityDescriptorControllerTests extends Specification {
"relyingPartyOverrides": null,
"attributeRelease": null,
"version": $version,
"createdBy": "someUser"
"createdBy": "someUser",
"current": false
}
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class VersionJsonSerializationBasicTests extends Specification {
def "Verify basic Version JSON serialization"() {
given:
def staticDate = ZonedDateTime.parse("2019-05-20T15:00:00.574Z")
def version = new Version('2', 'kramer', staticDate, false)
def version = new Version('2', 'kramer', staticDate)
def expectedJson = """
{
"id": "2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,30 @@ class UsersControllerIntegrationTests extends Specification {
def expectedJson = """
[
{
"modifiedBy" : null,
"modifiedBy" : anonymousUser,
"firstName" : "Joe",
"emailAddress" : "joe@institution.edu",
"role" : "ROLE_ADMIN",
"username" : "admin",
"createdBy" : null,
"createdBy" : anonymousUser,
"lastName" : "Doe"
},
{
"modifiedBy" : null,
"modifiedBy" : anonymousUser,
"firstName" : "Peter",
"emailAddress" : "peter@institution.edu",
"role" : "ROLE_USER",
"username" : "nonadmin",
"createdBy" : null,
"createdBy" : anonymousUser,
"lastName" : "Vandelay"
},
{
"modifiedBy" : null,
"modifiedBy" : anonymousUser,
"firstName" : "Anon",
"emailAddress" : "anon@institution.edu",
"role" : "ROLE_ADMIN",
"username" : "anonymousUser",
"createdBy" : null,
"createdBy" : anonymousUser,
"lastName" : "Ymous"
}
]"""
Expand All @@ -83,12 +83,12 @@ class UsersControllerIntegrationTests extends Specification {
given:
def expectedJson = """
{
"modifiedBy" : null,
"modifiedBy" : anonymousUser,
"firstName" : "Joe",
"emailAddress" : "joe@institution.edu",
"role" : "ROLE_ADMIN",
"username" : "admin",
"createdBy" : null,
"createdBy" : anonymousUser,
"lastName" : "Doe"
}"""
when: 'GET request is made for one existing user'
Expand Down Expand Up @@ -229,4 +229,4 @@ class UsersControllerIntegrationTests extends Specification {
then:
result.andExpect(status().isNotFound())
}
}
}

0 comments on commit d3da019

Please sign in to comment.