diff --git a/.gitignore b/.gitignore index daf913b..72127f6 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ _testmain.go *.exe *.test *.prof + +local.yml diff --git a/account_test.go b/account_test.go index c3367dc..1792820 100644 --- a/account_test.go +++ b/account_test.go @@ -5,42 +5,42 @@ import ( ) func (s *TmdbSuite) TestGetAccountInfo(c *C) { - result, err := s.tmdb.GetAccountInfo(session) + result, err := s.tmdb.GetAccountInfo(s.session) s.baseTest(&result, err, c) - c.Assert(result.Username, Equals, user) + c.Assert(result.Username, Equals, s.user) } func (s *TmdbSuite) TestGetAccountLists(c *C) { - result, err := s.tmdb.GetAccountLists(accountID, session, nil) + result, err := s.tmdb.GetAccountLists(s.accountID, s.session, nil) s.baseTest(&result, err, c) } func (s *TmdbSuite) TestGetAccountFavoriteMovies(c *C) { - result, err := s.tmdb.GetAccountFavoriteMovies(accountID, session, nil) + result, err := s.tmdb.GetAccountFavoriteMovies(s.accountID, s.session, nil) s.baseTest(&result, err, c) } func (s *TmdbSuite) TestGetAccountFavoriteTv(c *C) { - result, err := s.tmdb.GetAccountFavoriteTv(accountID, session, nil) + result, err := s.tmdb.GetAccountFavoriteTv(s.accountID, s.session, nil) s.baseTest(&result, err, c) } func (s *TmdbSuite) TestGetAccountRatedMovies(c *C) { - result, err := s.tmdb.GetAccountRatedMovies(accountID, session, nil) + result, err := s.tmdb.GetAccountRatedMovies(s.accountID, s.session, nil) s.baseTest(&result, err, c) } func (s *TmdbSuite) TestGetAccountRatedTv(c *C) { - result, err := s.tmdb.GetAccountRatedTv(accountID, session, nil) + result, err := s.tmdb.GetAccountRatedTv(s.accountID, s.session, nil) s.baseTest(&result, err, c) } func (s *TmdbSuite) TestGetAccountWatchlistMovies(c *C) { - result, err := s.tmdb.GetAccountWatchlistMovies(accountID, session, nil) + result, err := s.tmdb.GetAccountWatchlistMovies(s.accountID, s.session, nil) s.baseTest(&result, err, c) } func (s *TmdbSuite) TestGetAccountWatchlistTv(c *C) { - result, err := s.tmdb.GetAccountWatchlistTv(accountID, session, nil) + result, err := s.tmdb.GetAccountWatchlistTv(s.accountID, s.session, nil) s.baseTest(&result, err, c) } diff --git a/authentication_test.go b/authentication_test.go index 98f5d3c..2fdb568 100644 --- a/authentication_test.go +++ b/authentication_test.go @@ -4,27 +4,18 @@ import ( . "gopkg.in/check.v1" ) -const ( - userToken string = "" - user string = "" - pw string = "" - session string = "" - guestSession string = "" - accountID int = 0 -) - func (s *TmdbSuite) TestGetAuthToken(c *C) { result, err := s.tmdb.GetAuthToken() s.baseTest(&result, err, c) } func (s *TmdbSuite) TestGetAuthValidateToken(c *C) { - result, err := s.tmdb.GetAuthValidateToken(userToken, user, pw) + result, err := s.tmdb.GetAuthValidateToken(s.userToken, s.user, s.pw) s.baseTest(&result, err, c) } func (s *TmdbSuite) TestGetAuthSession(c *C) { - result, err := s.tmdb.GetAuthSession(userToken) + result, err := s.tmdb.GetAuthSession(s.userToken) s.baseTest(&result, err, c) } diff --git a/coverage/coverage_report.html b/coverage/coverage_report.html index fde7f34..72768a0 100644 --- a/coverage/coverage_report.html +++ b/coverage/coverage_report.html @@ -128,7 +128,7 @@
This is a coverage report created after analysis of the github.com/ryanbradynd05/go-tmdb
package. It
+
This is a coverage report created after analysis of the github.com/ryanbradynd05/go-tmdb
package. It
has been generated with the following command:
gocov test github.com/ryanbradynd05/go-tmdb | gocov-html
Here are the stats. Please select a function name to view its implementation and see what's left for testing.
TMDb.SearchTv(...) | github.com/ryanbradynd05/go-tmdb/search.go | 100.00% | 7/7 |
TMDb.SearchKeyword(...) | github.com/ryanbradynd05/go-tmdb/search.go | 100.00% | 7/7 |