tuna-timer/tuna-timer-api

View on GitHub

Showing 7 of 37 total issues

File timer_service_test.go has 639 lines of code (exceeds 500 allowed). Consider refactoring.
Open

package data

import (
    "log"
    "testing"
Severity: Minor
Found in data/timer_service_test.go - About 5 hrs to fix

    TimerServiceTestSuite has 22 methods (exceeds 20 allowed). Consider refactoring.
    Open

    func (s *TimerServiceTestSuite) TestgetActiveTimer(t *testing.T) {
    
        now := time.Now()
    
        // completed
    Severity: Minor
    Found in data/timer_service_test.go - About 2 hrs to fix

      Method TimerRepositoryTestSuite.TestTotalMinutesMethods has 67 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (s *TimerRepositoryTestSuite) TestTotalMinutesMethods(t *testing.T) {
      
          now := time.Now()
          // creates 10 timers one minute each
          for i := 10; i < 20; i++ {
      Severity: Minor
      Found in data/timer_repository_test.go - About 1 hr to fix

        Method TimerRepositoryTestSuite.TestFindUserTasksByRange has 61 lines of code (exceeds 50 allowed). Consider refactoring.
        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")
        Severity: Minor
        Found in data/timer_repository_test.go - About 1 hr to fix

          Method TimerRepositoryTestSuite.TestCompletedTasksForUser has 57 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func (s *TimerRepositoryTestSuite) TestCompletedTasksForUser(t *testing.T) {
          
              now := time.Now()
          
              s.repo.CreateTimer(&models.Timer{
          Severity: Minor
          Found in data/timer_repository_test.go - About 1 hr to fix

            Method TimerRepositoryTestSuite.TestUserStatistics has 56 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (s *TimerRepositoryTestSuite) TestUserStatistics(t *testing.T) {
                user := &models.TeamUser{
                    ID:             bson.NewObjectId(),
                    ExternalUserID: "user",
                    TeamID:        "team",
            Severity: Minor
            Found in data/timer_repository_test.go - About 1 hr to fix

              Method TimerServiceTestSuite.TestUpdateUserTimer has 52 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func (s *TimerServiceTestSuite) TestUpdateUserTimer(t *testing.T) {
                  user := &models.TeamUser{
                      ID:             bson.NewObjectId(),
                      ExternalUserID: "user",
                      TeamID:        "team",
              Severity: Minor
              Found in data/timer_service_test.go - About 1 hr to fix
                Severity
                Category
                Status
                Source
                Language