Skip to content

Commit

Permalink
test: テスト修正
Browse files Browse the repository at this point in the history
  • Loading branch information
seigi0714 committed Apr 8, 2023
1 parent a800e5f commit a68a20f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Future<void> main() async {

final mockApiClient = MockAbstractApiClient();

const validTripId = 999;
const validTitle = 'test_user';
final validFromDate = DateTime(2023);
final validEndDate = DateTime(2023, 1, 2);
Expand All @@ -53,7 +54,7 @@ Future<void> main() async {
) as NewTrip;

final validResult = Trip.createExistingTrip(
id: 0,
id: validTripId,
title: TripTitle(value: validTitle),
period: TripPeriod(
fromDate: validFromDate,
Expand All @@ -75,6 +76,7 @@ Future<void> main() async {
).thenAnswer((_) async {
return ApiResponse(
data: {
'id': validTripId,
'name': testNewTrip.title.value,
'from_date': testNewTrip.period.fromDate.toJsonDateString(),
'end_date': testNewTrip.period.endDate.toJsonDateString(),
Expand Down Expand Up @@ -161,6 +163,7 @@ Future<void> main() async {
group(
'fetchTripsByUserId',
() {
const validTripId = 999;
const validUserId = 1;
const validName = 'Bob';
const validEmail = 'bob@somedomain.com';
Expand All @@ -170,7 +173,7 @@ Future<void> main() async {
);
final validResult = [
Trip.createExistingTrip(
id: 0,
id: validTripId,
title: TripTitle(value: validTitle),
period: TripPeriod(
fromDate: validFromDate,
Expand All @@ -191,7 +194,7 @@ Future<void> main() async {
data: {
'items': [
{
'id': 1,
'id': validTripId,
'name': validTitle,
'members': [
{
Expand Down

0 comments on commit a68a20f

Please sign in to comment.