test/models_test.rb in devise_invitable-1.7.5 vs test/models_test.rb in devise_invitable-2.0.0
- old
+ new
@@ -1,9 +1,9 @@
require 'test_helper'
class Invitable < User
- devise :invitable, :invite_for => 5.days, :validate_on_invite => true
+ devise :invitable, invite_for: 5.days, validate_on_invite: true
end
class ModelsTest < ActiveSupport::TestCase
def include_module?(klass, mod)
klass.devise_modules.include?(mod) &&
@@ -45,12 +45,12 @@
User.invite_for = old_invite_for
end
test 'set a custom value for invite_key' do
old_invite_key = User.invite_key
- User.invite_key = {:username => /\A.+\z/}
+ User.invite_key = { username: /\A.+\z/}
- assert_equal({:username => /\A.+\z/}, User.invite_key)
+ assert_equal({ username: /\A.+\z/ }, User.invite_key)
User.invite_key = old_invite_key
end
test 'set a custom value for invitation_limit' do