summaryrefslogtreecommitdiff
path: root/users/test/unit/local_email_test.rb
blob: 9031a98f006fbfec05fc5b4b43dd7e9bd733c222 (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
require 'test_helper'

class LocalEmailTest < ActiveSupport::TestCase

  test "appends domain" do
    local = LocalEmail.new(handle)
    assert_equal LocalEmail.new(email), local
  end

  test "returns handle" do
    local = LocalEmail.new(email)
    assert_equal handle, local.handle
  end

  test "prints full email" do
    local = LocalEmail.new(handle)
    assert_equal email, "#{local}"
  end

  def handle
    "asdf"
  end

  def email
    "asdf@" + APP_CONFIG[:domain]
  end
end