blob: e21c40c14fa9d0dc4e1cd4750065d69c670b9893 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
require 'rails_helper'
RSpec.describe Organisation, type: :model do
subject = Organisation.new(name: "Hollander Property")
describe "validations" do
it "is invalid if no name given" do
subject.name = nil
expect(subject).to_not be_valid
end
it "is invalid with a name longer than 25 chars" do
subject.name = "a" * 26
expect(subject).to_not be_valid
end
end
end
|