Sha256: f647b57899dbf1249f2e8f2a909b1697ff3e8dc03ec75a6c32b6bd613182f23a
Contents?: true
Size: 793 Bytes
Versions: 5
Compression:
Stored size: 793 Bytes
Contents
RSpec.describe Symphonia::User do subject { FactoryBot.create(:user, email: "test@dummy.com") } it "#like" do expect(Symphonia::User.like(subject.mail)).to be_all Symphonia::User end it "#to_s" do expect(subject.to_s).to eq "#{subject.first_name} #{subject.last_name}" end it "#name=" do subject.name = "Tata smoula" expect(subject.first_name).to eq "Tata" expect(subject.last_name).to eq "smoula" end describe "#required_password" do it "require password for internal" do expect { FactoryBot.create(:user, password: nil) }.to raise_error ActiveRecord::RecordInvalid end it "do not require password for external_ids" do expect { FactoryBot.create(:user, password: nil, external_id: "ex1") }.not_to raise_error end end end
Version data entries
5 entries across 5 versions & 1 rubygems