diff --git a/3.2.x/grails-app/domain/demo/Album.groovy b/3.2.x/grails-app/domain/demo/Album.groovy index f3ca93a..36183cf 100644 --- a/3.2.x/grails-app/domain/demo/Album.groovy +++ b/3.2.x/grails-app/domain/demo/Album.groovy @@ -3,5 +3,5 @@ package demo class Album { String artistName String title - Genre genre + String genre } diff --git a/3.2.x/src/integration-test/groovy/demo/MusicFunctionalSpec.groovy b/3.2.x/src/integration-test/groovy/demo/MusicFunctionalSpec.groovy index 03a9d56..c6d5164 100644 --- a/3.2.x/src/integration-test/groovy/demo/MusicFunctionalSpec.groovy +++ b/3.2.x/src/integration-test/groovy/demo/MusicFunctionalSpec.groovy @@ -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") { @@ -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") { @@ -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: @@ -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[] @@ -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[] diff --git a/3.2.x/src/main/groovy/demo/Genre.groovy b/3.2.x/src/main/groovy/demo/Genre.groovy deleted file mode 100644 index 899ef53..0000000 --- a/3.2.x/src/main/groovy/demo/Genre.groovy +++ /dev/null @@ -1,5 +0,0 @@ -package demo - -enum Genre { - HEAVY_METAL, PROGRESSIVE_ROCK, BLUES, ROCK -}