require "test_helper"

class NodeWhitespaceTest < ActiveSupport::TestCase
  test "title and slug should strip whitespace" do
    node = Node.new(
      title_en: "  English Title  ",
      slug_en: "  english-slug  ",
      title_fr: "  Titre Français  ",
      slug_fr: "  titre-francais  "
    )
    node.valid?
    
    # These should be stripped after implemention
    # assert_equal "English Title", node.title_en
    # assert_equal "english-slug", node.slug_en
    # assert_equal "Titre Français", node.title_fr
    # assert_equal "titre-francais", node.slug_fr
    
    # Current behavior (before implementation)
    puts "Current title_en: '#{node.title_en}'"
    puts "Current slug_en: '#{node.slug_en}'"
    puts "Current title_fr: '#{node.title_fr}'"
    puts "Current slug_fr: '#{node.slug_fr}'"
  end
end
