Skip to content

Commit

Permalink
test: use setup() fixture method in test
Browse files Browse the repository at this point in the history
  • Loading branch information
matrei committed Dec 17, 2024
1 parent 8129ef1 commit d3ce674
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import grails.gorm.transactions.Rollback
@Integration(applicationClass = Application)
class SecuredControllerSpec extends ContainerGebSpec {

void setupData() {
def setup() {
if ( !User.findByUsername('sherlock') ) {
final boolean flush = true
final boolean failOnError = true
Expand All @@ -33,8 +33,6 @@ class SecuredControllerSpec extends ContainerGebSpec {
}

def "test login as sherlock, sherlock belongs to detective groups. All detectives have the role ADMIN"() {
given:
setupData()

when:
to SecuredPage
Expand All @@ -53,8 +51,6 @@ class SecuredControllerSpec extends ContainerGebSpec {
}

def "test login as watson, watson belongs to detective groups. All detectives have the role ADMIN"() {
given:
setupData()

when:
to SecuredPage
Expand Down

0 comments on commit d3ce674

Please sign in to comment.