From 51582a668b04d2c1322ad1babe8599ae8797cd3b Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 19 Jul 2013 11:20:01 +0200 Subject: test user validates uniqueness of login amongst aliases --- users/test/unit/user_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'users/test/unit') diff --git a/users/test/unit/user_test.rb b/users/test/unit/user_test.rb index 5d1fe06..f303c8d 100644 --- a/users/test/unit/user_test.rb +++ b/users/test/unit/user_test.rb @@ -56,6 +56,13 @@ class UserTest < ActiveSupport::TestCase other_user.destroy end + test "login needs to be unique amongst aliases" do + other_user = FactoryGirl.create :user + other_user.create_identity address: @user.login + assert !@user.valid? + other_user.destroy + end + test "deprecated public key api still works" do key = SecureRandom.base64(4096) @user.public_key = key -- cgit v1.2.3