WIP: try to fix unit test
This commit is contained in:
parent
c4afcb3c3e
commit
432f32b0a8
|
@ -107,18 +107,13 @@ class MessageReceiverDisappearingMessagesSpec: QuickSpec {
|
||||||
// MARK: -- updates the local config properly
|
// MARK: -- updates the local config properly
|
||||||
it("updates the local config properly") {
|
it("updates the local config properly") {
|
||||||
mockStorage.write { db in
|
mockStorage.write { db in
|
||||||
do {
|
try MessageReceiver.updateDisappearingMessagesConfigurationIfNeeded(
|
||||||
try MessageReceiver.updateDisappearingMessagesConfigurationIfNeeded(
|
db,
|
||||||
db,
|
threadId: "TestId",
|
||||||
threadId: "TestId",
|
threadVariant: .contact,
|
||||||
threadVariant: .contact,
|
message: mockMessage,
|
||||||
message: mockMessage,
|
proto: mockProto
|
||||||
proto: mockProto
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
print(error)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let updatedConfig: DisappearingMessagesConfiguration? = mockStorage.read { db in
|
let updatedConfig: DisappearingMessagesConfiguration? = mockStorage.read { db in
|
||||||
|
@ -128,7 +123,7 @@ class MessageReceiverDisappearingMessagesSpec: QuickSpec {
|
||||||
expect(updatedConfig?.isEnabled).to(beTrue())
|
expect(updatedConfig?.isEnabled).to(beTrue())
|
||||||
// expect(updatedConfig?.durationSeconds)
|
// expect(updatedConfig?.durationSeconds)
|
||||||
// .to(equal(DisappearingMessagesConfiguration.DefaultDuration.disappearAfterRead.seconds))
|
// .to(equal(DisappearingMessagesConfiguration.DefaultDuration.disappearAfterRead.seconds))
|
||||||
// expect(updatedConfig?.type).to(equal(.disappearAfterRead))
|
expect(updatedConfig?.type).to(equal(.disappearAfterRead))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue