mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
20 lines
432 B
Ruby
20 lines
432 B
Ruby
# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe Link, type: :model do
|
|
subject(:link) { create(:link) }
|
|
|
|
it 'can be saved' do
|
|
expect(link).to be_persisted
|
|
end
|
|
|
|
it 'Validates link uniqueness' do
|
|
link # create a matching link
|
|
|
|
other = build(:link)
|
|
other.save
|
|
|
|
expect(other.errors.full_messages).to include('Link already exists')
|
|
end
|
|
end
|