Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The TestGetDirPath (Test functions begin with Test) function uses the testing package to print a message before failing. You can explore the testing package here https://golang.org/pkg/testing/.

Change into your package directory and run:

go test

It should pass.


Next, we'll mock out the user package with Testify and rewrite our test.

...