The opposite of assert_select?

后端 未结 4 717
天涯浪人
天涯浪人 2021-02-01 13:06

I am writing an app where it is desirable to check if a view does not have some functionality - in particular because that functionality must be presented only to users

4条回答
  •  失恋的感觉
    2021-02-01 13:25

    Don't forget you can always pass in the count, and set that to zero.

    assert_select "a", {count: 0, text: "New"}, "This page must contain no anchors that say New"
    

提交回复
热议问题