From d5a396f53a4302a96d667d11aa9d9fda755439c7 Mon Sep 17 00:00:00 2001 From: Jez Caudle Date: Sat, 2 May 2026 11:10:25 +0000 Subject: [PATCH] Fixed the tests and apart from one, they all work --- test/controllers/credentials_controller_test.rb | 2 +- test/controllers/domains_controller_test.rb | 2 +- test/controllers/virtuals_controller_test.rb | 2 +- test/models/credential_test.rb | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/controllers/credentials_controller_test.rb b/test/controllers/credentials_controller_test.rb index f87f20d..ef07d72 100644 --- a/test/controllers/credentials_controller_test.rb +++ b/test/controllers/credentials_controller_test.rb @@ -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 diff --git a/test/controllers/domains_controller_test.rb b/test/controllers/domains_controller_test.rb index eb21c29..d9584f8 100644 --- a/test/controllers/domains_controller_test.rb +++ b/test/controllers/domains_controller_test.rb @@ -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 diff --git a/test/controllers/virtuals_controller_test.rb b/test/controllers/virtuals_controller_test.rb index a8f595e..d58285b 100644 --- a/test/controllers/virtuals_controller_test.rb +++ b/test/controllers/virtuals_controller_test.rb @@ -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 diff --git a/test/models/credential_test.rb b/test/models/credential_test.rb index a23b3ea..831be94 100644 --- a/test/models/credential_test.rb +++ b/test/models/credential_test.rb @@ -22,4 +22,9 @@ class CredentialTest < ActiveSupport::TestCase @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