Compare commits
2 Commits
6ebb7390d5
...
rails_8.1.
| Author | SHA1 | Date | |
|---|---|---|---|
| d5a396f53a | |||
| 5a38d132b8 |
@@ -5,7 +5,7 @@ class CredentialsControllerTest < ActionDispatch::IntegrationTest
|
|||||||
|
|
||||||
setup do
|
setup do
|
||||||
@credential = credentials(:one)
|
@credential = credentials(:one)
|
||||||
@domain = domains(:one)
|
@domain = domains(:domainone)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "should not get new" do
|
test "should not get new" do
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require "test_helper"
|
|||||||
class DomainsControllerTest < ActionDispatch::IntegrationTest
|
class DomainsControllerTest < ActionDispatch::IntegrationTest
|
||||||
include Devise::Test::IntegrationHelpers
|
include Devise::Test::IntegrationHelpers
|
||||||
setup do
|
setup do
|
||||||
@domain = domains(:one)
|
@domain = domains(:domainone)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "not should get index because user not logged in" do
|
test "not should get index because user not logged in" do
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class VirtualsControllerTest < ActionDispatch::IntegrationTest
|
|||||||
|
|
||||||
setup do
|
setup do
|
||||||
@virtual = virtuals(:one)
|
@virtual = virtuals(:one)
|
||||||
@domain = domains(:one)
|
@domain = domains(:domainone)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "should get not get new because we are not logged in" do
|
test "should get not get new because we are not logged in" do
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ class CredentialTest < ActiveSupport::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
test "domain added to name" do
|
test "domain added to name" do
|
||||||
@c = Credential.new(email: "jez@#{domains(:one).domain}", password: "1234567&ab", domain_id: domains(:one).id)
|
@c = Credential.new(email: "jez@#{domains(:domainone).domain}", password: "1234567&ab", domain_id: domains(:domainone).id)
|
||||||
assert @c.save
|
assert @c.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "domain_id not the same as domain" do
|
||||||
|
@c = Credential.new(email: "steve@#{domains(:domainone).domain}", password: "1234567&ab", domain_id: domains(:domainone).id)
|
||||||
|
assert_not @c.save
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class VirtualTest < ActiveSupport::TestCase
|
|||||||
@v = Virtual.new
|
@v = Virtual.new
|
||||||
@v.email = "abuse@example.net"
|
@v.email = "abuse@example.net"
|
||||||
@v.destination = "valid@email.com"
|
@v.destination = "valid@email.com"
|
||||||
@v.domain_id = domains(:one).id + 1234
|
@v.domain_id = domains(:domainone).id + 1234
|
||||||
assert !@v.save
|
assert !@v.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user