add rspec tests

This commit is contained in:
Josh
2018-05-18 11:51:03 -04:00
parent 6cdcd89387
commit f189c98c56
12 changed files with 451 additions and 6 deletions

View File

@ -0,0 +1,19 @@
require "rails_helper"
describe Meeting, type: :model do
it "should be valid." do
meeting = create(:meeting)
expect(meeting).to be_valid
end
it "name should be present." do
meeting = build(:meeting, name: nil)
expect(meeting).to_not be_valid
end
it "#random_password is random." do
meeting = create(:meeting)
expect(meeting.send(:random_password, 10)).to_not eql(meeting.send(:random_password, 10))
end
end