Skip to content

Commit

Permalink
✅ add additional test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
oharaandrew314 committed Mar 1, 2024
1 parent 8fc0ae5 commit d950a14
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/kotlin/io/andrewohara/dynamokt/GH9Test.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import io.kotest.assertions.throwables.shouldThrow
import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder
import io.kotest.matchers.collections.shouldHaveSize
import io.kotest.matchers.nulls.shouldNotBeNull
import io.kotest.matchers.shouldBe
import io.kotest.matchers.types.shouldBeInstanceOf
import org.http4k.aws.AwsSdkAsyncClient
import org.http4k.connect.amazon.dynamodb.FakeDynamoDb
Expand Down Expand Up @@ -84,6 +85,16 @@ class GH9Test {
}.get()
}.cause.shouldBeInstanceOf<IllegalArgumentException>()
}

@Test
fun `update missing item`() {
val testClient = enhancedClient
.table(TABLE_NAME, DataClassTableSchema(TestEntityV1::class))
.also { it.createTable().get() }

val item = TestEntityV1("id1", "foo")
testClient.updateItem(item).get() shouldBe item
}
}

data class TestEntityV2(
Expand Down

0 comments on commit d950a14

Please sign in to comment.