Sha256: 316fb7918b0d2e01c023a4efac189261190e19740709ac4ee4ed9dda95fc5896
Contents?: true
Size: 317 Bytes
Versions: 51
Compression:
Stored size: 317 Bytes
Contents
require 'rails_helper' RSpec.describe "User", :type => :model do it "prevents duplicates " do user1 = create(:user, code: 'abc', email: 'test@email.com') user2 = build(:user, code: 'abc', email: 'test@email.com') user1.should be_valid #user2.should be_valid user2.should_not have_valid(:code) end end
Version data entries
51 entries across 48 versions & 4 rubygems