Skip to content

Commit 197c528

Browse files
committed
chore: Fix broken unit tests
1 parent b180fa2 commit 197c528

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/test/java/com/microfocus/example/DataSeeder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class DataSeeder {
2626
public static final String TEST_USER2_USERNAME = "test2";
2727
public static final String TEST_USER2_FIRST_NAME = "Test";
2828
public static final String TEST_USER2_LAST_NAME = "User 2";
29+
public static final String TEST_USER2_GENDER = "Male";
2930
public static final String TEST_USER2_PASSWORD = "0n3L0ngPa55w0rd";
3031
public static final String TEST_USER2_EMAIL = "test2@localhost";
3132
public static final String TEST_USER2_PHONE = "0123456789";
@@ -90,6 +91,7 @@ public static User generateUser() {
9091
user.setPassword(EncryptedPasswordUtils.encryptPassword(TEST_USER2_PASSWORD));
9192
user.setFirstName(TEST_USER2_FIRST_NAME);
9293
user.setLastName(TEST_USER2_LAST_NAME);
94+
user.setGender(TEST_USER2_GENDER);
9395
user.setEmail(TEST_USER2_EMAIL);
9496
user.setPhone(TEST_USER2_PHONE);
9597
// no roles

src/test/resources/data.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ VALUES ('c97f4c8b-4c14-4d0c-9354-69fd7ee324da', 'bd5b9e2f-ac55-4e34-a76d-599b7e5
2323
INSERT INTO reviews (id, product_id, user_id, review_date, comment, rating, visible)
2424
VALUES ('8ab3eb7c-42f6-11ec-81d3-0242ac130003', '38400000-8cf0-11bd-b23e-10b96e4ef00d', 'bd5b9e2f-ac55-4e34-a76d-599b7e5b3308',
2525
CURDATE()-5, 'This is an example review of Test Product 1. It is very good', 5, 1);
26+
INSERT INTO refresh_tokens (id, user_id, expiry_date)
27+
VALUES ('08b43d0d-2d86-4252-9782-10e73266d5c5', 'bd5b9e2f-ac55-4e34-a76d-599b7e5b3308', CURDATE() + 1);
2628

src/test/resources/schema.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ create table orders
8585
cart clob default null,
8686
shipped bit(1) not null,
8787
shipped_date datetime default null,
88+
order_notes clob default null,
89+
credit_card clob default null,
8890
primary key (id)
8991
);
9092
create table reviews

0 commit comments

Comments
 (0)