mirror of
https://github.com/VinylDNS/vinyldns
synced 2025-09-02 23:35:18 +00:00
Replace old leftResultOf and rightResultOf calls with IO methods
This commit is contained in:
@@ -1257,9 +1257,7 @@ class RecordSetServiceSpec
|
|||||||
.when(mockGroupRepo)
|
.when(mockGroupRepo)
|
||||||
.getGroup(okGroup.id)
|
.getGroup(okGroup.id)
|
||||||
|
|
||||||
val result = rightResultOf(
|
val result = underTest.updateRecordSet(newRecord, auth).map(_.asInstanceOf[RecordSetChange]).value.unsafeRunSync().toOption.get
|
||||||
underTest.updateRecordSet(newRecord, auth).map(_.asInstanceOf[RecordSetChange]).value
|
|
||||||
)
|
|
||||||
|
|
||||||
result.recordSet.ownerGroupId shouldBe Some(okGroup.id)
|
result.recordSet.ownerGroupId shouldBe Some(okGroup.id)
|
||||||
}
|
}
|
||||||
@@ -1288,7 +1286,7 @@ class RecordSetServiceSpec
|
|||||||
.when(mockGroupRepo)
|
.when(mockGroupRepo)
|
||||||
.getGroup(oneUserDummyGroup.id)
|
.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]
|
result shouldBe an[NotAuthorizedError]
|
||||||
}
|
}
|
||||||
"succeed if user is in owner group and zone is shared and new owner group is none" in {
|
"succeed if user is in owner group and zone is shared and new owner group is none" in {
|
||||||
|
Reference in New Issue
Block a user