diff --git a/test/shopify_liquid/scope_index/base_entry_test.rb b/test/shopify_liquid/source_index/base_entry_test.rb similarity index 100% rename from test/shopify_liquid/scope_index/base_entry_test.rb rename to test/shopify_liquid/source_index/base_entry_test.rb diff --git a/test/shopify_liquid/scope_index/filter_entry_test.rb b/test/shopify_liquid/source_index/filter_entry_test.rb similarity index 100% rename from test/shopify_liquid/scope_index/filter_entry_test.rb rename to test/shopify_liquid/source_index/filter_entry_test.rb diff --git a/test/shopify_liquid/source_index/filter_state_test.rb b/test/shopify_liquid/source_index/filter_state_test.rb new file mode 100644 index 00000000..ba57f404 --- /dev/null +++ b/test/shopify_liquid/source_index/filter_state_test.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'test_helper' + +module ThemeCheck + module ShopifyLiquid + class SourceIndex + class FilterStateTest < Minitest::Test + def test_state_changes + FilterState.mark_up_to_date + refute(FilterState.outdated?) + + FilterState.mark_outdated + assert(FilterState.outdated?) + end + end + end + end +end diff --git a/test/shopify_liquid/scope_index/object_entry_test.rb b/test/shopify_liquid/source_index/object_entry_test.rb similarity index 100% rename from test/shopify_liquid/scope_index/object_entry_test.rb rename to test/shopify_liquid/source_index/object_entry_test.rb diff --git a/test/shopify_liquid/source_index/object_state_test.rb b/test/shopify_liquid/source_index/object_state_test.rb new file mode 100644 index 00000000..bc131eea --- /dev/null +++ b/test/shopify_liquid/source_index/object_state_test.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'test_helper' + +module ThemeCheck + module ShopifyLiquid + class SourceIndex + class ObjectStateTest < Minitest::Test + def test_state_changes + ObjectState.mark_up_to_date + refute(ObjectState.outdated?) + + ObjectState.mark_outdated + assert(ObjectState.outdated?) + end + end + end + end +end diff --git a/test/shopify_liquid/scope_index/parameter_entry_test.rb b/test/shopify_liquid/source_index/parameter_entry_test.rb similarity index 100% rename from test/shopify_liquid/scope_index/parameter_entry_test.rb rename to test/shopify_liquid/source_index/parameter_entry_test.rb diff --git a/test/shopify_liquid/scope_index/property_entry_test.rb b/test/shopify_liquid/source_index/property_entry_test.rb similarity index 100% rename from test/shopify_liquid/scope_index/property_entry_test.rb rename to test/shopify_liquid/source_index/property_entry_test.rb diff --git a/test/shopify_liquid/scope_index/return_type_entry_test.rb b/test/shopify_liquid/source_index/return_type_entry_test.rb similarity index 100% rename from test/shopify_liquid/scope_index/return_type_entry_test.rb rename to test/shopify_liquid/source_index/return_type_entry_test.rb diff --git a/test/shopify_liquid/scope_index/tag_entry_test.rb b/test/shopify_liquid/source_index/tag_entry_test.rb similarity index 100% rename from test/shopify_liquid/scope_index/tag_entry_test.rb rename to test/shopify_liquid/source_index/tag_entry_test.rb diff --git a/test/shopify_liquid/source_index/tag_state_test.rb b/test/shopify_liquid/source_index/tag_state_test.rb new file mode 100644 index 00000000..8c463647 --- /dev/null +++ b/test/shopify_liquid/source_index/tag_state_test.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'test_helper' + +module ThemeCheck + module ShopifyLiquid + class SourceIndex + class TagStateTest < Minitest::Test + def test_state_changes + TagState.mark_up_to_date + refute(TagState.outdated?) + + TagState.mark_outdated + assert(TagState.outdated?) + end + end + end + end +end