Sha256: 4192418a3a78994c7d3da3fbdbcaf8466fb4dd20f8cadba34a30dec56d4e1cc5
Contents?: true
Size: 471 Bytes
Versions: 16
Compression:
Stored size: 471 Bytes
Contents
require 'rails_helper' RSpec.describe TeamUser, type: :model do it "should make a valid instance" do TeamUser.make.valid?.should == true end it "should save a valid instance" do TeamUser.make!.should == TeamUser.last end it "should validate the user belongs to the project" do t = TeamUser.make(team: Team.make!, user: User.make!) t.valid?.should == false t.errors.messages[:user].first.should =~ /is not on the \w+ project/ end end
Version data entries
16 entries across 16 versions & 1 rubygems