Skip to content

Commit

Permalink
Remove @PendingFeature from tests which pass after grails/grails-test…
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfredley committed Sep 29, 2024
1 parent e408c92 commit 05f3d1c
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class DomainClassWithDefaultConstraintsUnitTestMixinTests extends Specification
}
}}

@PendingFeature(reason = 'it is null')
void testCreateDomainSingleLineWithConfigHavingNullableTrueForAllProperties() {
expect:
new DomainWithDefaultConstraints(name:"My test").save(flush:true) != null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class GroovyPageUnitTestMixinWithCustomViewDirSpec extends Specification impleme
}}

@Issue('GRAILS=11543')
@PendingFeature(reason = 'result is null')
void 'test rendering a template when grails.gsp.view.dir has been assigned a value'() {
when:
def result = render(template: '/demo/myTemplate')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class StaticCallbacksSpec extends Specification implements GrailsUnitTest {
grailsApplication.mainContext.getBean('myService') != null
}

@PendingFeature(reason="myConfigValue is null")
def "doWithConfig callback is executed"(){
expect:
config.myConfigValue == 'Hello'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ class TestInstanceCallbacksSpec extends Specification implements GrailsUnitTest
grailsApplication != null
}

@PendingFeature(reason = 'org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named \'myService\' available')
def "doWithSpring callback is executed"() {
expect:
grailsApplication.mainContext.getBean('myService') != null
}

@PendingFeature(reason = 'myConfigValue is null')
def "doWithConfig callback is executed"(){
expect:
config.myConfigValue == 'Hello'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class ChainMethodWithRequestDataValueProcessorSpec extends Specification impleme
requestDataValueProcessor MockRequestDataValueProcessor
}}

@PendingFeature(reason = '?requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test chain method with model and request data value processor'() {
when:
controller.save()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class RedirectMethodWithRequestDataValueProcessorSpec extends Specification impl
requestDataValueProcessor MockRequestDataValueProcessor
}}

@PendingFeature(reason = '?requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test redirect in controller with all upper class class name'() {
when:
controller.index()
Expand All @@ -21,7 +20,6 @@ class RedirectMethodWithRequestDataValueProcessorSpec extends Specification impl
"/redirect/list?requestDataValueProcessorParamName=paramValue" == response.redirectedUrl
}

@PendingFeature(reason = '?requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test permanent redirect'() {
when:
controller.toActionPermanent()
Expand All @@ -31,7 +29,6 @@ class RedirectMethodWithRequestDataValueProcessorSpec extends Specification impl
301 == response.status
}

@PendingFeature(reason = '&requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test redirect to controller with duplicate params'() {
when:
controller.toControllerWithDuplicateParams()
Expand All @@ -40,7 +37,6 @@ class RedirectMethodWithRequestDataValueProcessorSpec extends Specification impl
"/test/foo?one=two&one=three&requestDataValueProcessorParamName=paramValue" == response.redirectedUrl
}

@PendingFeature(reason = '?requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test redirect with fragment'() {
when:
controller.toControllerAndActionWithFragment()
Expand All @@ -49,7 +45,6 @@ class RedirectMethodWithRequestDataValueProcessorSpec extends Specification impl
"/test/foo?requestDataValueProcessorParamName=paramValue#frag" == response.redirectedUrl
}

@PendingFeature(reason = '?requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test redirect to default action of another controller'() {
when:
controller.redirectToDefaultAction()
Expand All @@ -58,7 +53,6 @@ class RedirectMethodWithRequestDataValueProcessorSpec extends Specification impl
"/redirect/toAction?requestDataValueProcessorParamName=paramValue" == response.redirectedUrl
}

@PendingFeature(reason = '?requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test redirect to action'() {
when:
controller.toAction()
Expand All @@ -67,7 +61,6 @@ class RedirectMethodWithRequestDataValueProcessorSpec extends Specification impl
"/redirect/foo?requestDataValueProcessorParamName=paramValue" == response.redirectedUrl
}

@PendingFeature(reason = '?requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test redirect to controller'() {
when:
controller.toController()
Expand All @@ -76,7 +69,6 @@ class RedirectMethodWithRequestDataValueProcessorSpec extends Specification impl
"/test?requestDataValueProcessorParamName=paramValue" == response.redirectedUrl
}

@PendingFeature(reason = '&requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test redirect to controller with params'() {
when:
controller.toControllerWithParams()
Expand All @@ -85,7 +77,6 @@ class RedirectMethodWithRequestDataValueProcessorSpec extends Specification impl
"/test/foo?one=two&two=three&requestDataValueProcessorParamName=paramValue" == response.redirectedUrl
}

@PendingFeature(reason = '&requestDataValueProcessorParamName=paramValue is missing from URL')
void 'test redirect to controller with duplicate array params'() {
when:
controller.toControllerWithDuplicateArrayParams()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ class RespondMethodSpec extends Specification implements ControllerUnitTest<Book
modelAndView.viewName == 'showWithModel'
}

@PendingFeature(reason = 'modelAndView is null')
void "Test that the respond method produces errors HTML for a domain instance that has errors and a content type of HTML"() {
given:"A book instance"
def book = new Book(title: "")
Expand All @@ -183,7 +182,6 @@ class RespondMethodSpec extends Specification implements ControllerUnitTest<Book
modelAndView.viewName == 'showWithModel'
}

@PendingFeature(reason = 'modelAndView is null')
void "Test that proxyHandler is used for unwrapping wrapped model"() {
given:"A book instance"
def book = new Book(title: "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ class CommandObjectsSpec extends Specification implements ControllerUnitTest<Tes
/[A-Z]+/ == matchesProperty
}

@PendingFeature(reason='theAnswer is null')
void "Test command object gets autowired"() {
when:
def model = controller.methodAction()
Expand All @@ -170,7 +169,6 @@ class CommandObjectsSpec extends Specification implements ControllerUnitTest<Tes

}

@PendingFeature(reason='person has errors')
void 'Test bindable command object constraint'() {
when:
controller.params.name = 'JFK'
Expand All @@ -185,7 +183,6 @@ class CommandObjectsSpec extends Specification implements ControllerUnitTest<Tes
model.person.city == null
}

@PendingFeature(reason='person has errors')
void "Test validation"() {
when:
controller.params.name = 'JFK'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class MarshallerRegistrarSpec extends Specification implements ControllerUnitTes
marshallerRegistrar(MarshallerRegistrar)
}}

@PendingFeature(reason = 'contentAsString = {"content":"Content","dateCreated":"2024-09-28T19:41:59Z"}')
def "should use custom marshaller"() {
when:
controller.show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class DynamicActionNameEvaluatingTests extends Specification implements UrlMappi
"read" == info.actionName
}

@PendingFeature(reason = 'params.ctrl is null')
void testNamedParameterAction2() {
when:
webRequest.params.put("controller", "book")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class ResponseCodeUrlMappingTests extends Specification implements UrlMappingsUn
!info
}

@PendingFeature(reason = "delegate is instance of org.grails.web.mapping.RegexUrlMapping")
void testNoReverseMappingOccures() {
when:
def creator = urlMappingsHolder.getReverseMapping("errors", "error404", null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class UrlMappingParameterTests extends Specification implements UrlMappingsUnitT

}

@PendingFeature(reason='lang is null')
void testUseDispatchAction() {
when:
webRequest.params.controller = 'foo'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import spock.lang.Specification

class UrlMappingTests extends Specification implements UrlMappingsUnitTest<UrlMappings> {

@PendingFeature(reason="grails.web.mapping.exceptions.UrlMappingException: Unable to create URL for mapping [/(*)/(*)?/(*)?(.(*))?] and parameters [{id=tsandcs}]. Parameter [controller] is required, but was not specified!")
void testReverseTopLevelMapping() {

when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class ContentFormatControllerTests extends Specification implements ControllerUn
"""{"name":"iPod"}""".toString() == response.contentAsString
}

@PendingFeature(reason = 'html != all')
void testAllFormat() {
when:
request.addHeader "Accept", "*/*"
Expand All @@ -58,7 +57,6 @@ class ContentFormatControllerTests extends Specification implements ControllerUn
"all" == response.contentAsString
}

@PendingFeature(reason = 'html != all')
void testWithFormatAndAll() {
when:
request.addHeader "Accept", "*/*"
Expand All @@ -74,7 +72,6 @@ class ContentFormatControllerTests extends Specification implements ControllerUn
"html" == response.format
}

@PendingFeature(reason = 'html != all')
void testWithFormatAndAll2() {
when:
request.addHeader "Accept", "*/*"
Expand All @@ -90,7 +87,6 @@ class ContentFormatControllerTests extends Specification implements ControllerUn
"js" == response.format
}

@PendingFeature(reason = 'html != all')
void testDefaultFormat() {
when:
controller.testFormat()
Expand All @@ -99,7 +95,6 @@ class ContentFormatControllerTests extends Specification implements ControllerUn
"all" == response.contentAsString
}

@PendingFeature(reason = 'js != all')
void testWithContentTypeAndAcceptHeader() {
when:
// should favour content type header
Expand Down Expand Up @@ -140,7 +135,6 @@ class ContentFormatControllerTests extends Specification implements ControllerUn
"html" == request.format
}

@PendingFeature(reason = 'js != all')
void testPrototypeFormat() {
when:
request.addHeader "Accept", "text/javascript, text/html, application/xml, text/xml, */*"
Expand Down Expand Up @@ -179,7 +173,6 @@ class ContentFormatControllerTests extends Specification implements ControllerUn
"<html></html>" == response.contentAsString
}

@PendingFeature(reason = '<html></html> != alert(\'hello\')')
void testPrototypeWithFormat() {
when:
request.addHeader "Accept", "text/javascript, text/html, application/xml, text/xml, */*"
Expand All @@ -189,7 +182,6 @@ class ContentFormatControllerTests extends Specification implements ControllerUn
"alert('hello')" == response.contentAsString
}

@PendingFeature(reason = '<html></html> != alert(\'hello\')')
void testWithFormatParameterOverride() {
when:
request.setParameter "format", "js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class WithFormatContentTypeSpec extends Specification implements ControllerUnitT
}}

@Issue('GRAILS-11093')
@PendingFeature(reason = '/wildcardView != /formView')
void 'Test specifying form contentType'() {
when: 'content type is specified'
request.contentType = FORM_CONTENT_TYPE
Expand All @@ -31,7 +30,6 @@ class WithFormatContentTypeSpec extends Specification implements ControllerUnitT
}

@Issue('GRAILS-11093')
@PendingFeature(reason = '/wildcardView != /formView')
void 'Test specifying multipartForm contentType'() {
when: 'content type is specified'
request.contentType = MULTIPART_FORM_CONTENT_TYPE
Expand Down

0 comments on commit 05f3d1c

Please sign in to comment.