mirror of
https://github.com/afollestad/nock-nock.git
synced 2025-08-03 06:38:38 +00:00
Fix a few test cases
This commit is contained in:
parent
35eda8f057
commit
10d7fe33f9
1 changed files with 26 additions and 3 deletions
|
@ -431,9 +431,30 @@ class AppDatabaseTest() {
|
||||||
|
|
||||||
val allSites = db.allSites()
|
val allSites = db.allSites()
|
||||||
assertThat(allSites.size).isEqualTo(3)
|
assertThat(allSites.size).isEqualTo(3)
|
||||||
assertThat(allSites[0]).isEqualTo(MOCK_MODEL_1)
|
assertThat(allSites[0]).isEqualTo(
|
||||||
assertThat(allSites[1]).isEqualTo(MOCK_MODEL_2)
|
MOCK_MODEL_1.copy(
|
||||||
assertThat(allSites[2]).isEqualTo(MOCK_MODEL_3)
|
headers = listOf(
|
||||||
|
MOCK_MODEL_1.headers.first().copy(id = 1),
|
||||||
|
MOCK_MODEL_1.headers.last().copy(id = 2)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
assertThat(allSites[1]).isEqualTo(
|
||||||
|
MOCK_MODEL_2.copy(
|
||||||
|
headers = listOf(
|
||||||
|
MOCK_MODEL_2.headers.first().copy(id = 3),
|
||||||
|
MOCK_MODEL_2.headers.last().copy(id = 4)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
assertThat(allSites[2]).isEqualTo(
|
||||||
|
MOCK_MODEL_3.copy(
|
||||||
|
headers = listOf(
|
||||||
|
MOCK_MODEL_3.headers.first().copy(id = 5),
|
||||||
|
MOCK_MODEL_3.headers.last().copy(id = 6)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test fun extension_put_getSite() {
|
@Test fun extension_put_getSite() {
|
||||||
|
@ -470,10 +491,12 @@ class AppDatabaseTest() {
|
||||||
)
|
)
|
||||||
val updatedHeaders = listOf(
|
val updatedHeaders = listOf(
|
||||||
modelToUpdate.headers.first().copy(
|
modelToUpdate.headers.first().copy(
|
||||||
|
id = 7,
|
||||||
key = "One",
|
key = "One",
|
||||||
value = "Hello"
|
value = "Hello"
|
||||||
),
|
),
|
||||||
modelToUpdate.headers.last().copy(
|
modelToUpdate.headers.last().copy(
|
||||||
|
id = 8,
|
||||||
key = "Two",
|
key = "Two",
|
||||||
value = "Hey"
|
value = "Hey"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue