mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
11 lines
350 B
Ruby
11 lines
350 B
Ruby
|
|
require 'rails_helper'
|
||
|
|
|
||
|
|
RSpec.describe Service, type: :model do
|
||
|
|
it { is_expected.to validate_presence_of(:name) }
|
||
|
|
it { is_expected.to validate_presence_of(:description) }
|
||
|
|
it { is_expected.to validate_uniqueness_of(:name) }
|
||
|
|
|
||
|
|
it { is_expected.to have_many(:user_services) }
|
||
|
|
it { is_expected.to have_many(:users).through(:user_services) }
|
||
|
|
end
|