aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/organisation_spec.rb
blob: 090cdc290fd916d659f55616b36a322ecc6d5007 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'rails_helper'

RSpec.describe Organisation, type: :model do
  describe "validations" do
    it "is invalid if no name given" do
      org = Organisation.new()
      expect(org).to_not be_valid
    end

    it "is invalid with a name longer than 25 chars" do
      name = "a" * 26
      org = Organisation.new(name: name)
      expect(org).to_not be_valid
    end
  end
end