@@ -22,11 +22,11 @@ func TestQuery_WhenDatabaseHasRecords_ShouldReturnEmails(t *testing.T) {
2222
2323 now := time .Now ()
2424
25- rows := sqlmock .NewRows ([]string {"id" , "status" , "eml_file_path" , " payload_file_path" , "reason" , "version" , "updated_at" }).
26- AddRow ("test-id-1" , "READY" , "" , " /path/to/payload" , "" , 1 , now ).
27- AddRow ("test-id-2" , "READY" , "" , " /path/to/payload2" , "some reason" , 2 , now )
25+ rows := sqlmock .NewRows ([]string {"id" , "status" , "payload_file_path" , "reason" , "version" , "updated_at" }).
26+ AddRow ("test-id-1" , "READY" , "/path/to/payload" , "" , 1 , now ).
27+ AddRow ("test-id-2" , "READY" , "/path/to/payload2" , "some reason" , 2 , now )
2828
29- mock .ExpectQuery ("SELECT id, status, eml_file_path, payload_file_path, reason, version, updated_at FROM emails" ).
29+ mock .ExpectQuery ("SELECT id, status, payload_file_path, reason, version, updated_at FROM emails" ).
3030 WithArgs ("READY" , 25 ).
3131 WillReturnRows (rows )
3232
@@ -38,7 +38,6 @@ func TestQuery_WhenDatabaseHasRecords_ShouldReturnEmails(t *testing.T) {
3838 require .Len (t , emails , 2 )
3939 assert .Equal (t , "test-id-1" , emails [0 ].Id )
4040 assert .Equal (t , "READY" , emails [0 ].Status )
41- assert .Equal (t , "" , emails [0 ].EmlFilePath )
4241 assert .Equal (t , "test-id-2" , emails [1 ].Id )
4342
4443 assert .NoError (t , mock .ExpectationsWereMet ())
@@ -70,7 +69,7 @@ func TestQuery_WhenDatabaseHasNoRecords_ShouldReturnEmptySlice(t *testing.T) {
7069 require .NoError (t , err )
7170 defer db .Close ()
7271
73- rows := sqlmock .NewRows ([]string {"id" , "status" , "eml_file_path" , " payload_file_path" , "reason" , "version" , "updated_at" })
72+ rows := sqlmock .NewRows ([]string {"id" , "status" , "payload_file_path" , "reason" , "version" , "updated_at" })
7473
7574 mock .ExpectQuery ("SELECT" ).
7675 WithArgs ("READY" , 10 ).
@@ -172,7 +171,7 @@ func TestReady_WhenUpdateSucceeds_ShouldReturnNoError(t *testing.T) {
172171
173172 sut := NewOutboxWithDB (db )
174173
175- err = sut .Ready (context .TODO (), "test-id" , "" , nil )
174+ err = sut .Ready (context .TODO (), "test-id" )
176175
177176 assert .NoError (t , err )
178177 assert .NoError (t , mock .ExpectationsWereMet ())
@@ -193,7 +192,7 @@ func TestReady_WhenNoRowsAffected_ShouldReturnLockError(t *testing.T) {
193192
194193 sut := NewOutboxWithDB (db )
195194
196- err = sut .Ready (context .TODO (), "test-id" , "" , nil )
195+ err = sut .Ready (context .TODO (), "test-id" )
197196
198197 assert .Error (t , err )
199198 assert .ErrorIs (t , err , ErrLockNotAcquired )
0 commit comments