Skip to content

Commit 2ea7a94

Browse files
committed
Use || to separate results from input in Spock tests.
@see http://docs.spockframework.org/en/latest/data_driven_testing.html#syntactic-variations No functional changes.
1 parent 4b79d52 commit 2ea7a94

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/test/groovy/ru/mystamps/web/service/ImageServiceTest.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ class ImageServiceTest extends Specification {
9898
return true
9999
}) >> new Image()
100100
where:
101-
contentType | expectedType
102-
'image/jpeg' | Image.Type.JPEG
103-
'image/jpeg; charset=UTF-8' | Image.Type.JPEG
104-
'image/png' | Image.Type.PNG
105-
'image/png; charset=UTF8' | Image.Type.PNG
101+
contentType || expectedType
102+
'image/jpeg' || Image.Type.JPEG
103+
'image/jpeg; charset=UTF-8' || Image.Type.JPEG
104+
'image/png' || Image.Type.PNG
105+
'image/png; charset=UTF8' || Image.Type.PNG
106106
}
107107

108108
def "save() should throw exception when image dao returned null"() {

src/test/groovy/ru/mystamps/web/service/SeriesServiceTest.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,11 +506,11 @@ class SeriesServiceTest extends Specification {
506506
return true
507507
})
508508
where:
509-
canAddComment | comment | expectedComment
510-
false | null | null
511-
false | "test" | null
512-
true | null | null
513-
true | "Some text" | "Some text"
509+
canAddComment | comment || expectedComment
510+
false | null || null
511+
false | "test" || null
512+
true | null || null
513+
true | "Some text" || "Some text"
514514
}
515515

516516
def "add() should assign created at to current date"() {

0 commit comments

Comments
 (0)