Showing 7 of 37 total issues
File timer_service_test.go
has 639 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
package data
import (
"log"
"testing"
TimerServiceTestSuite
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
Open
func (s *TimerServiceTestSuite) TestgetActiveTimer(t *testing.T) {
now := time.Now()
// completed
Method TimerRepositoryTestSuite.TestTotalMinutesMethods
has 67 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (s *TimerRepositoryTestSuite) TestTotalMinutesMethods(t *testing.T) {
now := time.Now()
// creates 10 timers one minute each
for i := 10; i < 20; i++ {
Method TimerRepositoryTestSuite.TestFindUserTasksByRange
has 61 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (s *TimerRepositoryTestSuite) TestFindUserTasksByRange(t *testing.T) {
firstUserID := bson.NewObjectId().Hex()
secondUserID := bson.NewObjectId().Hex()
startDate := utils.PT("2016 Dec 20 00:00:00")
Method TimerRepositoryTestSuite.TestCompletedTasksForUser
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (s *TimerRepositoryTestSuite) TestCompletedTasksForUser(t *testing.T) {
now := time.Now()
s.repo.CreateTimer(&models.Timer{
Method TimerRepositoryTestSuite.TestUserStatistics
has 56 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (s *TimerRepositoryTestSuite) TestUserStatistics(t *testing.T) {
user := &models.TeamUser{
ID: bson.NewObjectId(),
ExternalUserID: "user",
TeamID: "team",
Method TimerServiceTestSuite.TestUpdateUserTimer
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (s *TimerServiceTestSuite) TestUpdateUserTimer(t *testing.T) {
user := &models.TeamUser{
ID: bson.NewObjectId(),
ExternalUserID: "user",
TeamID: "team",