Skip to content

Commit

Permalink
MODTLR-5 Fix test db schema creation
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-barannyk committed Jan 11, 2024
1 parent 5f427ee commit 27a65a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions src/main/resources/db/changelog/changes/initial_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">

<!-- Changeset for creating table title_level_request with columns id, created_by, updated_by -->
<!-- Changeset for creating table title_level_request with all the required fields -->
<changeSet id="createTitleLevelRequestTable" author="OleksandrVidinieiev">
<comment>
Create title_level_request table
</comment>
<createTable tableName="title_level_request">
<column name="id" type="uuid">
<column name="id" type="uuid">
<constraints primaryKey="true"/>
</column>
</column>
<column name="instance_id" type="uuid"/>
<column name="requester_id" type="uuid"/>
<column name="request_type" type="varchar(255)"/>
<column name="request_level" type="varchar(255)"/>
<column name="request_expiration_date" type="datetime"/>
<column name="patron_comments" type="varchar(255)"/>
<column name="fulfillment_preference" type="varchar(255)"/>
<column name="pickup_service_point_id" type="uuid"/>
<column name="created_date" type="timestamp without time zone" defaultValueComputed="now()">
<constraints nullable="false"/>
</column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void titleLevelRequestShouldSuccessfullyBeCreated() {
TitleLevelRequest mockRequest = new TitleLevelRequest();
when(requestsService.post(any(TitleLevelRequest.class))).thenReturn(mockRequest);

var response = requestsController.postTitleLevelRequest(new TitleLevelRequest());
var response = requestsController.postTitleLevelRequest(new TitleLevelRequest());

assertEquals(CREATED, response.getStatusCode());
assertEquals(mockRequest, response.getBody());
Expand Down

0 comments on commit 27a65a6

Please sign in to comment.