# Copyright (C) 2024 Manuel Bustillo require 'rails_helper' RSpec.describe Wedding, type: :model do describe 'validations' do subject { build(:wedding) } describe 'slug' do it { should allow_value('foo').for(:slug) } it { should allow_value('foo-bar').for(:slug) } it { should allow_value('foo-123').for(:slug) } it { should allow_value('foo-123-').for(:slug) } it { should allow_value('foo--123').for(:slug) } it { should_not allow_value('Foo').for(:slug) } it { should_not allow_value('/foo').for(:slug) } it { should_not allow_value('foo/123').for(:slug) } it { should_not allow_value('foo_123').for(:slug) } it { should_not allow_value('foo/').for(:slug) } end end end