fluentd-ui/spec/models/user_spec.rb
yoshihara 886c8be8e1 Fix the broken model spec
Before, validated user is invalid, but other validations cause (length,
and wrong current_password)
2015-04-08 17:40:36 +09:00

17 lines
371 B
Ruby

require 'spec_helper'
describe User do
let(:user) { build(:user) }
describe "#valid?" do
describe "password" do
it "password != password_confirmation is invalid" do
user.current_password = user.password
user.password = "aaaaaaaa"
user.password_confirmation = "bbbbbbbb"
user.should_not be_valid
end
end
end
end