Skip to content

Add ability to check that attribute does not exist in Spring MVC test framework [SPR-10509] #15141

@spring-projects-issues

Description

@spring-projects-issues

Piotr Jagielski opened SPR-10509 and commented

It would be useful to have the ability to check that an attribute does not exist in the Spring MVC test framework.

Currently ModelResultMatchers has a method attributeExists(). I propose adding a new method attributeDoesNotExist().

Alternatively, expect(model().attribute("attribute", null)) should pass when the attribute is not available, but it currently fails with a NullPointerException instead.


Affects: 3.2.2

Referenced from: commits 98da5a7, 9095770

0 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions