2
0
mirror of https://github.com/VinylDNS/vinyldns synced 2025-08-30 22:05:21 +00:00

Replace old leftResultOf and rightResultOf calls with IO methods

This commit is contained in:
nspadaccino
2023-02-20 17:19:08 -05:00
parent 4aab2e8e17
commit e4a1357d7e

View File

@@ -1257,9 +1257,7 @@ class RecordSetServiceSpec
.when(mockGroupRepo)
.getGroup(okGroup.id)
val result = rightResultOf(
underTest.updateRecordSet(newRecord, auth).map(_.asInstanceOf[RecordSetChange]).value
)
val result = underTest.updateRecordSet(newRecord, auth).map(_.asInstanceOf[RecordSetChange]).value.unsafeRunSync().toOption.get
result.recordSet.ownerGroupId shouldBe Some(okGroup.id)
}
@@ -1288,7 +1286,7 @@ class RecordSetServiceSpec
.when(mockGroupRepo)
.getGroup(oneUserDummyGroup.id)
val result = leftResultOf(underTest.updateRecordSet(newRecord, auth).value)
val result = underTest.updateRecordSet(newRecord, auth).value.unsafeRunSync().swap.toOption.get
result shouldBe an[NotAuthorizedError]
}
"succeed if user is in owner group and zone is shared and new owner group is none" in {