Compare commits

...

2 Commits

Author SHA1 Message Date
d5a396f53a Fixed the tests and apart from one, they all work 2026-05-02 11:10:25 +00:00
5a38d132b8 Fixed some model tests 2026-05-02 10:51:55 +00:00
5 changed files with 10 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ class CredentialsControllerTest < ActionDispatch::IntegrationTest
setup do
@credential = credentials(:one)
@domain = domains(:one)
@domain = domains(:domainone)
end
test "should not get new" do

View File

@@ -3,7 +3,7 @@ require "test_helper"
class DomainsControllerTest < ActionDispatch::IntegrationTest
include Devise::Test::IntegrationHelpers
setup do
@domain = domains(:one)
@domain = domains(:domainone)
end
test "not should get index because user not logged in" do

View File

@@ -5,7 +5,7 @@ class VirtualsControllerTest < ActionDispatch::IntegrationTest
setup do
@virtual = virtuals(:one)
@domain = domains(:one)
@domain = domains(:domainone)
end
test "should get not get new because we are not logged in" do

View File

@@ -19,7 +19,12 @@ class CredentialTest < ActiveSupport::TestCase
end
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
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

View File

@@ -43,7 +43,7 @@ class VirtualTest < ActiveSupport::TestCase
@v = Virtual.new
@v.email = "abuse@example.net"
@v.destination = "valid@email.com"
@v.domain_id = domains(:one).id + 1234
@v.domain_id = domains(:domainone).id + 1234
assert !@v.save
end