Sha256: d127eb1731fe472770f77ece0fb830f92843a6d9cc30c72eecbe612fa975fdaf
Contents?: true
Size: 934 Bytes
Versions: 2
Compression:
Stored size: 934 Bytes
Contents
require 'test_helper' class ConfirmableTest < ActiveSupport::TestCase setup do @user = users(:julien) end test "generate_confirmation_token" do @user.generate_confirmation_token refute_nil @user.confirmation_token refute_nil @user.confirmation_sent_at assert_nil @user.confirmed_at @user.reload assert_nil @user.confirmation_token assert_nil @user.confirmation_sent_at assert_nil @user.confirmed_at end test "confirm!" do @user.generate_confirmation_token @user.confirm! assert_nil @user.confirmation_token assert_nil @user.confirmation_sent_at refute_nil @user.confirmed_at end test "find_for_confirmation" do assert_nil User.find_for_confirmation(nil) assert_nil User.find_for_confirmation("amroiuzigsqjg") @user.generate_confirmation_token @user.save! assert_equal @user, User.find_for_confirmation(@user.confirmation_token) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
janus-0.10.1 | test/unit/confirmable_test.rb |
janus-0.10.0 | test/unit/confirmable_test.rb |