Skip to content

Commit

Permalink
PRSD-649: Creates data-landlord-search.sql for SearchRegisterTests
Browse files Browse the repository at this point in the history
  • Loading branch information
isobel-softwire committed Jan 14, 2025
1 parent df6a818 commit c987ff0
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import uk.gov.communities.prsdb.webapp.integration.pageObjects.pages.SearchLandl
import uk.gov.communities.prsdb.webapp.integration.pageObjects.pages.basePages.BasePage.Companion.assertPageIs
import kotlin.test.assertContains

@Sql("/data-local.sql")
@Sql("/data-landlord-search.sql")
class SearchRegisterTests : IntegrationTest() {
@Test
fun `results table does not show before search has been requested`() {
Expand Down
57 changes: 57 additions & 0 deletions src/test/resources/data-landlord-search.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
INSERT INTO one_login_user (id, name, email, created_date, last_modified_date)
VALUES ('urn:fdc:gov.uk:2022:ABCDE', 'Bob T Builder', '[email protected]', '09/13/24', '09/13/24'),
('urn:fdc:gov.uk:2022:FGHIJ', 'Anne Other', '[email protected]', '09/13/24', '09/13/24'),
('urn:fdc:gov.uk:2022:KLMNO', 'Ford Prefect', '[email protected]', '10/07/24', '10/07/24'),
('urn:fdc:gov.uk:2022:UVWXY', 'Mock User', '[email protected]', '10/14/24', '10/14/24'),
('urn:fdc:gov.uk:2022:PQRST', 'Arthur Dent', '[email protected]', '10/09/24', '10/09/24'),
('urn:fdc:gov.uk:2022:07lXHJeQwE0k5PZO7w_PQF425vT8T7e63MrvyPYNSoI', 'Jasmin Conterio',
'[email protected]', '10/07/24', '10/07/24'),
('urn:fdc:gov.uk:2022:mwfvbb5GgiDh0acjz9EDDQ7zwskWZzUSnWfavL70f6s', 'Isobel Ibironke',
'[email protected]', '10/02/24', '10/02/24'),
('urn:fdc:gov.uk:2022:mGHDySEVfCsvfvc6lVWf6Qt9Dv0ZxPQWKoEzcjnBlUo', 'PRSDB Landlord',
'[email protected]', '10/15/24', '10/15/24'),
('urn:fdc:gov.uk:2022:n93slCXHsxJ9rU6-AFM0jFIctYQjYf0KN9YVuJT-cao', 'PRSDB LA Admin',
'[email protected]', '10/15/24', '10/15/24'),
('urn:fdc:gov.uk:2022:cgVX2oJWKHMwzm8Gzx25CSoVXixVS0rw32Sar4Om8vQ', 'PRSDB La User',
'[email protected]', '10/15/24', '10/15/24');

INSERT INTO local_authority (id, name, created_date, last_modified_date)
VALUES (1, 'Betelgeuse', '09/13/24', '09/13/24');

INSERT INTO local_authority_user (subject_identifier, is_manager, local_authority_id, created_date, last_modified_date,
name, email)
VALUES ('urn:fdc:gov.uk:2022:UVWXY', true, 1, '10/14/24', '10/14/24', 'Mock User', '[email protected]');

INSERT INTO registration_number (id, created_date, number, type)
VALUES (1, '09/13/24', 2001001001, 1),
(2, '09/13/24', 3002001002, 1),
(3, '10/07/24', 4003001003, 1),
(4, '10/14/24', 5004001004, 1),
(5, '10/09/24', 6005001005, 1),
(6, '12/10/24', 7006001006, 0),
(7, '12/19/24', 8005001005, 1);

INSERT INTO address (id, created_date, last_modified_date, uprn, single_line_address)
VALUES (1, '09/13/24', '09/13/24', 1, '1 Fictional Road'),
(2, '09/13/24', '09/13/24', 2, '2 Fake Way'),
(3, '09/13/24', '09/13/24', 3, '3 Imaginary Street'),
(4, '09/13/24', '09/13/24', 4, '4 Pretend Crescent'),
(5, '09/13/24', '09/13/24', 5, '5 Mythical Place'),
(6, '12/10/2024', '12/10/2024', 1123456, '1, Example Road, EG');

INSERT INTO landlord (id, created_date, last_modified_date, registration_number_id, address_id, date_of_birth,
is_active, phone_number, subject_identifier, name, email)
VALUES (1, '09/13/24', '09/13/24', 1, 1, '09/13/2000', true, 07111111111, 'urn:fdc:gov.uk:2022:UVWXY',
'Alexander Smith', '[email protected]'),
(2, '09/13/24', '09/13/24', 2, 2, '08/13/2001', true, 07111111111, 'urn:fdc:gov.uk:2022:ABCDE',
'Alexandra Davies', '[email protected]'),
(3, '09/13/24', '09/13/24', 3, 3, '07/13/1997', true, 07111111111, 'urn:fdc:gov.uk:2022:PQRST',
'Evan Alexandrescu', '[email protected]'),
(4, '09/13/24', '09/13/24', 4, 4, '06/13/1989', true, 07111111111,
'urn:fdc:gov.uk:2022:07lXHJeQwE0k5PZO7w_PQF425vT8T7e63MrvyPYNSoI', 'Tobias Evans', '[email protected]'),
(5, '09/13/24', '09/13/24', 5, 5, '05/13/1950', true, 07111111111,
'urn:fdc:gov.uk:2022:mwfvbb5GgiDh0acjz9EDDQ7zwskWZzUSnWfavL70f6s', 'Margaret Mary Smith',
'[email protected]'),
(6, '12/19/24', '12/19/24', 7, 5, '06/13/1989', true, 07111111111,
'urn:fdc:gov.uk:2022:mGHDySEVfCsvfvc6lVWf6Qt9Dv0ZxPQWKoEzcjnBlUo', 'PRSDB Landlord',
'[email protected]');

0 comments on commit c987ff0

Please sign in to comment.