Skip to content

Commit

Permalink
EVENT: Update Move() method with path arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Cian911 committed Dec 28, 2021
1 parent c25084f commit 5f9b377
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions event/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestEvent(t *testing.T) {

t.Run("It moves file from one dir to another dir", func(t *testing.T) {
event := eventSetup(t)
event.Move()
event.Move(event.Path)

// If the file does not exist, log an error
if _, err := os.Stat(fmt.Sprintf("%s/%s", event.Destination, event.File)); errors.Is(err, os.ErrNotExist) {
Expand All @@ -54,7 +54,7 @@ func TestEvent(t *testing.T) {
t.Run("It does not move file from one dir to another dir", func(t *testing.T) {
event := eventSetup(t)
event.Destination = "/abcdefg"
err := event.Move()
err := event.Move(event.Path)

if err == nil {
log.Fatal("event.Move() should have thrown error but didn't.")
Expand Down

0 comments on commit 5f9b377

Please sign in to comment.