Created
June 23, 2016 18:05
-
-
Save chrislerum/0d7b2cd288d58e2b20e09919600e92a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tr> | |
<td class="my-label"> | |
<input type="checkbox" name="user[role_ids][]" id="role_1" value="1" checked="checked" /> | |
</td> | |
<td class="value"> | |
<label for="role_1">Approver</label> | |
</td> | |
</tr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scenario "can un-assign roles for user" do | |
r = Role.where(name: 'Approver').first | |
u = create(:user) | |
u.set_roles :approver | |
visit edit_admin_user_path u | |
uncheck 'Approver' | |
click_button 'Update User' | |
expect(u.roles).to_not include r | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
behaves as if uncheck 'Approver' doesn't happen.
this all works in the browser, just can't get the spec working.
is this not how I should be unchecking a checkbox?