summaryrefslogtreecommitdiff
path: root/users/test/unit/identity_test.rb
blob: 3130ddc7e360dd95721d83d4daf71c24b89c60eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'test_helper'

class IdentityTest < ActiveSupport::TestCase

  setup do
    @user = FactoryGirl.create(:user)
  end

  test "user has identity to start with" do
    id = @user.build_identity
    assert_equal @user.email_address, id.address
    assert_equal @user.email_address, id.destination
    assert_equal @user, id.user
  end

  test "add alias" do
    skip
    @user.create_identity address: @alias
  end

  test "add forward" do
    skip
    @user.create_identity destination: @external
  end

  test "forward alias" do
    skip
    @user.create_identity address: @alias, destination: @external
  end

end