[sync] add test for s3client objecthead thunking
This commit is contained in:
parent
387904d1af
commit
f099765dd3
1 changed files with 22 additions and 0 deletions
22
src/test/scala/net/kemitix/s3thorp/SyncSuite.scala
Normal file
22
src/test/scala/net/kemitix/s3thorp/SyncSuite.scala
Normal file
|
@ -0,0 +1,22 @@
|
|||
package net.kemitix.s3thorp
|
||||
|
||||
import java.time.Instant
|
||||
|
||||
import cats.effect.IO
|
||||
import org.scalatest.FunSpec
|
||||
|
||||
class SyncSuite extends FunSpec {
|
||||
|
||||
describe("s3client thunk") {
|
||||
val hash = "hash"
|
||||
val lastModified = Instant.now()
|
||||
val sync = new Sync(new S3Client {
|
||||
override def objectHead(bucket: String, key: String) = IO((hash, lastModified))
|
||||
})
|
||||
describe("objectHead") {
|
||||
it("return the hash and lastModified expected") {
|
||||
assertResult((hash, lastModified))(sync.objectHead("", "").unsafeRunSync())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue