mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 19:56:00 +00:00
Clean up AttachmentTable schema.
This commit is contained in:
committed by
Alex Hart
parent
62b142cdeb
commit
fe39b5e4e2
@@ -214,7 +214,7 @@ class UploadDependencyGraphTest {
|
||||
val uploadData = AttachmentUploadJobData.ADAPTER.decode(steps[1][0].serialize()!!)
|
||||
val copyData = JsonJobData.deserialize(steps[2][0].serialize())
|
||||
|
||||
val uploadAttachmentId = AttachmentId(uploadData.attachmentRowId, uploadData.attachmentUniqueId)
|
||||
val uploadAttachmentId = AttachmentId(uploadData.attachmentId)
|
||||
val copySourceAttachmentId = JsonUtils.fromJson(copyData.getString("source_id"), AttachmentId::class.java)
|
||||
|
||||
assertEquals(uploadAttachmentId, copySourceAttachmentId)
|
||||
@@ -228,7 +228,7 @@ class UploadDependencyGraphTest {
|
||||
|
||||
private fun getAttachmentForPreUpload(id: Long, attachment: Attachment): DatabaseAttachment {
|
||||
return DatabaseAttachment(
|
||||
attachmentId = AttachmentId(id, id),
|
||||
attachmentId = AttachmentId(id),
|
||||
mmsId = AttachmentTable.PREUPLOAD_MESSAGE_ID,
|
||||
hasData = false,
|
||||
hasThumbnail = false,
|
||||
@@ -237,10 +237,9 @@ class UploadDependencyGraphTest {
|
||||
size = attachment.size,
|
||||
fileName = attachment.fileName,
|
||||
cdnNumber = attachment.cdnNumber,
|
||||
location = attachment.location,
|
||||
key = attachment.key,
|
||||
relay = attachment.relay,
|
||||
digest = attachment.digest,
|
||||
location = attachment.remoteLocation,
|
||||
key = attachment.remoteKey,
|
||||
digest = attachment.remoteDigest,
|
||||
incrementalDigest = attachment.incrementalDigest,
|
||||
incrementalMacChunkSize = attachment.incrementalMacChunkSize,
|
||||
fastPreflightId = attachment.fastPreflightId,
|
||||
|
||||
@@ -84,7 +84,7 @@ class StoriesTest {
|
||||
val messageRecord = FakeMessageRecords.buildMediaMmsMessageRecord(
|
||||
linkPreviews = listOf(
|
||||
FakeMessageRecords.buildLinkPreview(
|
||||
attachmentId = AttachmentId(1, 2)
|
||||
attachmentId = AttachmentId(1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -42,7 +42,7 @@ class StoryContextMenuTest {
|
||||
@Test
|
||||
fun `Given a story with an attachment, when I share, then I expect the correct stream, type, and flag`() {
|
||||
// GIVEN
|
||||
val attachmentId = AttachmentId(1, 2)
|
||||
val attachmentId = AttachmentId(1)
|
||||
val storyRecord = FakeMessageRecords.buildMediaMmsMessageRecord(
|
||||
storyType = StoryType.STORY_WITH_REPLIES,
|
||||
slideDeck = SlideDeck().apply {
|
||||
|
||||
Reference in New Issue
Block a user