Skip to content

Commit

Permalink
Backport DownloadSupportSpec & fix downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Nov 28, 2024
1 parent da82dff commit a5e0137
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
- name: "🔨 Build project"
id: build
run: ./gradlew build
- name: "🏃‍♀️Run functional tests"
run: |
cd spock-container-test-app
./gradlew check
publish:
if: github.event_name == 'push'
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.demo.spock

import grails.plugin.geb.ContainerGebSpec
import grails.testing.mixin.integration.Integration

@Integration
class DownloadSupportSpec extends ContainerGebSpec {

void 'should be able to use download methods'() {
when:
go '/'

then:
downloadText().contains('Welcome to Grails')
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@ trait ContainerAwareDownloadSupport implements DownloadSupport {

@Delegate
@Shared
DownloadSupport downloadSupport
static DownloadSupport downloadSupport

static void setDownloadSupport(DownloadSupport downloadSupport) {
this.downloadSupport = downloadSupport
}
}

0 comments on commit a5e0137

Please sign in to comment.