old_test/unit/topic_test.rb

Summary

Maintainability
D
3 days
Test Coverage

File topic_test.rb has 686 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require File.dirname(__FILE__) + '/../test_helper'

class TopicTest < ActiveSupport::TestCase
  # fixtures preloaded
  include KeteUrlFor
Severity: Major
Found in old_test/unit/topic_test.rb - About 1 day to fix

    Class TopicTest has 54 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class TopicTest < ActiveSupport::TestCase
      # fixtures preloaded
      include KeteUrlFor
    
      def setup
    Severity: Major
    Found in old_test/unit/topic_test.rb - About 7 hrs to fix

      Method test_extended_content_accessors_with_ftype_topic_type_multiple has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def test_extended_content_accessors_with_ftype_topic_type_multiple
          for_topic_with(
            TopicType.find_by_name("Person"),
            {
              :label => "Relatives",
      Severity: Major
      Found in old_test/unit/topic_test.rb - About 2 hrs to fix

        Method test_structured_extended_content_getter_with_multiple_ftype_topic_type has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def test_structured_extended_content_getter_with_multiple_ftype_topic_type
            for_topic_with(
              TopicType.find_by_name("Person"), {
                :label => "Relatives",
                :ftype => 'topic_type',
        Severity: Minor
        Found in old_test/unit/topic_test.rb - About 1 hr to fix

          Method test_structured_extended_content_setter_with_ftype_topic_type_multiple has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def test_structured_extended_content_setter_with_ftype_topic_type_multiple
              for_topic_with(
                TopicType.find_by_name("Person"),
                {
                  :label => "Relatives",
          Severity: Minor
          Found in old_test/unit/topic_test.rb - About 1 hr to fix

            TODO found
            Open

              # TODO: seems we are missing choices tests that have a value that is different than label
            Severity: Minor
            Found in old_test/unit/topic_test.rb by fixme

            TODO found
            Open

              # TODO: add year and circa validation testing
            Severity: Minor
            Found in old_test/unit/topic_test.rb by fixme

            TODO found
            Open

              # TODO: We do not have a plan for how radio fields are to be used in Kete.
            Severity: Minor
            Found in old_test/unit/topic_test.rb by fixme

            TODO found
            Open

              # TODO: need accessor tests for date, year (including circa), map ftypes, etc.
            Severity: Minor
            Found in old_test/unit/topic_test.rb by fixme

            There are no issues that match your filters.

            Category
            Status