Skip to content

Commit

Permalink
Replace enum with String for now
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffscottbrown committed Nov 27, 2017
1 parent 7b5bfc7 commit 1f9a39a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion 3.2.x/grails-app/domain/demo/Album.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package demo
class Album {
String artistName
String title
Genre genre
String genre
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class MusicFunctionalSpec extends Specification {
and:
resp.json.artistName == 'King Crimson'
resp.json.title == 'Red'
resp.json.genre.name == 'PROGRESSIVE_ROCK'
resp.json.genre == 'PROGRESSIVE_ROCK'

when:
resp = rest.post("http://localhost:${serverPort}/albums") {
Expand All @@ -73,7 +73,7 @@ class MusicFunctionalSpec extends Specification {
and:
resp.json.artistName == 'Riverside'
resp.json.title == 'Love, Fear and the Time Machine'
resp.json.genre.name == 'PROGRESSIVE_ROCK'
resp.json.genre == 'PROGRESSIVE_ROCK'

when:
resp = rest.post("http://localhost:${serverPort}/albums") {
Expand All @@ -93,7 +93,7 @@ class MusicFunctionalSpec extends Specification {
and:
resp.json.artistName == 'Johnny Winter'
resp.json.title == 'Progressive Blues Experiment'
resp.json.genre.name == 'BLUES'
resp.json.genre == 'BLUES'


when:
Expand All @@ -114,7 +114,7 @@ class MusicFunctionalSpec extends Specification {
and:
resp.json.artistName == 'Motorhead'
resp.json.title == "No Sleep 'til Hammersmith"
resp.json.genre.name == 'HEAVY_METAL'
resp.json.genre == 'HEAVY_METAL'
}
// end::create_albums[]

Expand All @@ -133,22 +133,22 @@ class MusicFunctionalSpec extends Specification {
and:
resp.json[0].artistName == 'King Crimson'
resp.json[0].title == 'Red'
resp.json[0].genre.name == 'PROGRESSIVE_ROCK'
resp.json[0].genre == 'PROGRESSIVE_ROCK'

and:
resp.json[1].artistName == 'Riverside'
resp.json[1].title == 'Love, Fear and the Time Machine'
resp.json[1].genre.name == 'PROGRESSIVE_ROCK'
resp.json[1].genre == 'PROGRESSIVE_ROCK'

and:
resp.json[3].artistName == 'Motorhead'
resp.json[3].title == "No Sleep 'til Hammersmith"
resp.json[3].genre.name == 'HEAVY_METAL'
resp.json[3].genre == 'HEAVY_METAL'

and:
resp.json[2].artistName == 'Johnny Winter'
resp.json[2].title == 'Progressive Blues Experiment'
resp.json[2].genre.name == 'BLUES'
resp.json[2].genre == 'BLUES'
}
// end::get_albums[]

Expand Down
5 changes: 0 additions & 5 deletions 3.2.x/src/main/groovy/demo/Genre.groovy

This file was deleted.

0 comments on commit 1f9a39a

Please sign in to comment.