Sha256: a6dd1e69edbc63319abb9357f6cad9f3c97d7f698cf573e4fc0869f1487b7dcb
Contents?: true
Size: 787 Bytes
Versions: 23
Compression:
Stored size: 787 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe User do dataset :readers # activate_authlogic let(:user) { users(:existing) } let(:reader) { readers(:user) } it "should have an associated reader" do user.reader.should == reader reader.user.should == user end describe "on update" do it "should update the attributes of an associated reader" do user.name = "Cardinal Fang" user.save! user.reader.name.should == "Cardinal Fang" end it "should update the associated reader's credentials" do user.password = 'bl0tto' user.password_confirmation = 'bl0tto' user.save! user.authenticated?('bl0tto').should be_true user.reader.valid_password?('bl0tto').should be_true end end end
Version data entries
23 entries across 23 versions & 1 rubygems