Sha256: 6f33a5c664fdab09c9d745c74ca474a6bd1f8ac9474cba56cf563424d3ebd6ee
Contents?: true
Size: 478 Bytes
Versions: 15
Compression:
Stored size: 478 Bytes
Contents
require "spec_helper" describe BazaModels::Model::CustomValidations do include DatabaseHelper let(:user) { User.new(email: "test@example.com") } it "validates custom validations" do user.custom_valid = false expect(user.valid?).to eq false expect(user.errors.full_messages.join(". ")).to eq "Custom validate failed" expect(user.save).to eq false user.custom_valid = nil expect(user.valid?).to eq true expect(user.save).to eq true end end
Version data entries
15 entries across 15 versions & 1 rubygems