require "spec_helper"
require "models/valid_against_schema"

RSpec.describe ProtectedFoodDrinkName do
  let(:payload) { FactoryBot.create(:protected_food_drink_name) }
  include_examples "it saves payloads that are valid against the 'specialist_document' schema"

  it "is not exportable" do
    expect(described_class).not_to be_exportable
  end
end

require "spec_helper"
require "models/valid_against_schema"

RSpec.describe ProtectedFoodDrinkName do
  subject(:payload) { FactoryBot.create(:protected_food_drink_name) }
  include_examples "it saves payloads that are valid against the 'specialist_document' schema"

  it "is not exportable" do
    expect(described_class).not_to be_exportable
  end

  context "with Greek characters" do
    subject(:document) { ProtectedFoodDrinkName.new(title: "Στερεά Ελλάδα") }

    it "has a valid base_path" do
      expect(document.base_path).to eq("/protected-food-drink-names/sterea-ellada")
    end
  end
end

Add a test for Greek letters
Add a test for Greek letters

In 00abe551fd0c98a88c5447106e30545b234319f4 we added support for
transliterating Greek letters. This commit adds a test to ensure that
protected food & drink names made entirely of Greek letters get a
suitable base_path which was the original issue we were seeing.
