Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kolsys committed Apr 12, 2024
1 parent 3b0b903 commit 85262bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmd/slackdump/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func Test_checkParameters(t *testing.T) {
slackdump.DefOptions.CacheDir = app.CacheDir()

// test
emptyEntityList, _ := structures.NewEntityList([]string{})
type args struct {
args []string
}
Expand All @@ -72,7 +73,7 @@ func Test_checkParameters(t *testing.T) {
},
FilenameTemplate: defFilenameTemplate,

Input: config.Input{List: &structures.EntityList{}},
Input: config.Input{List: emptyEntityList},
Output: config.Output{Filename: "-", Format: "text"},
Options: slackdump.DefOptions,
}},
Expand All @@ -93,7 +94,7 @@ func Test_checkParameters(t *testing.T) {
Users: true,
},
FilenameTemplate: defFilenameTemplate,
Input: config.Input{List: &structures.EntityList{}},
Input: config.Input{List: emptyEntityList},
Output: config.Output{Filename: "-", Format: "text"},
Options: slackdump.DefOptions,
}},
Expand Down
3 changes: 2 additions & 1 deletion export/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ func TestExport_exportConversation(t *testing.T) {
Return(tt.mocks.rets.closeErr)
}
}
if err := exp.exportConversation(context.Background(), testUserIdx, tt.args.ch); (err != nil) != tt.wantErr {
exportItem := &structures.EntityItem{Id: tt.args.ch.ID}
if err := exp.exportConversation(context.Background(), testUserIdx, tt.args.ch, exportItem); (err != nil) != tt.wantErr {
t.Errorf("Export.exportConversation() error = %v, wantErr %v", err, tt.wantErr)
}
})
Expand Down

0 comments on commit 85262bd

Please sign in to comment.