Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinBeczak committed Mar 20, 2024
1 parent fc0bc3d commit 59e2639
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions test/org/maproulette/framework/service/TaskBundleServiceSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ class TaskBundleServiceSpec(implicit val application: Application) extends Frame
)

val response =
this.service.createTaskBundle(User.superUser, "my bundle", Some(task1.id), List(task1.id, task2.id))
this.service.createTaskBundle(
User.superUser,
"my bundle",
Some(task1.id),
List(task1.id, task2.id)
)
response.taskIds.length mustEqual 2

// tasks.bundle_id is NOT set until setTaskStatus is called!!!
Expand All @@ -51,7 +56,12 @@ class TaskBundleServiceSpec(implicit val application: Application) extends Frame

// Cannot create a bundle with tasks already assigned
intercept[InvalidException] {
this.service.createTaskBundle(User.superUser, "my bundle again", Some(task1.id), List(task1.id, task2.id))
this.service.createTaskBundle(
User.superUser,
"my bundle again",
Some(task1.id),
List(task1.id, task2.id)
)
}
}

Expand Down Expand Up @@ -93,7 +103,12 @@ class TaskBundleServiceSpec(implicit val application: Application) extends Frame

// Cannot create a bundle with tasks from different challenges
intercept[InvalidException] {
this.service.createTaskBundle(User.superUser, "bad bundle", Some(task1.id), List(task1.id, task2.id))
this.service.createTaskBundle(
User.superUser,
"bad bundle",
Some(task1.id),
List(task1.id, task2.id)
)
}
}

Expand All @@ -110,7 +125,12 @@ class TaskBundleServiceSpec(implicit val application: Application) extends Frame
)

val bundle =
this.service.createTaskBundle(User.superUser, "my bundle for get", Some(task1.id), List(task1.id, task2.id))
this.service.createTaskBundle(
User.superUser,
"my bundle for get",
Some(task1.id),
List(task1.id, task2.id)
)

val response = this.service.getTaskBundle(User.superUser, bundle.bundleId)
response.bundleId mustEqual bundle.bundleId
Expand All @@ -130,7 +150,12 @@ class TaskBundleServiceSpec(implicit val application: Application) extends Frame
)

val bundle = this.service
.createTaskBundle(User.superUser, "my bundle for delete", Some(task1.id), List(task1.id, task2.id))
.createTaskBundle(
User.superUser,
"my bundle for delete",
Some(task1.id),
List(task1.id, task2.id)
)

// tasks.bundle_id is NOT set until setTaskStatus is called
taskDAL.setTaskStatus(
Expand Down Expand Up @@ -159,7 +184,12 @@ class TaskBundleServiceSpec(implicit val application: Application) extends Frame
)

val bundle = this.service
.createTaskBundle(User.superUser, "my bundle for delete", Some(task1.id), List(task1.id, task2.id))
.createTaskBundle(
User.superUser,
"my bundle for delete",
Some(task1.id),
List(task1.id, task2.id)
)

// tasks.bundle_id is NOT set until setTaskStatus is called
taskDAL.setTaskStatus(
Expand Down Expand Up @@ -193,7 +223,12 @@ class TaskBundleServiceSpec(implicit val application: Application) extends Frame
)

val bundle = this.service
.createTaskBundle(User.superUser, "my bundle for unbundle", Some(task1.id), List(task1.id, task2.id))
.createTaskBundle(
User.superUser,
"my bundle for unbundle",
Some(task1.id),
List(task1.id, task2.id)
)

// tasks.bundle_id is NOT set until setTaskStatus is called
taskDAL.setTaskStatus(
Expand Down

0 comments on commit 59e2639

Please sign in to comment.