Delete specific E2ER in spec

This commit is contained in:
Rob H
2014-09-10 15:21:48 +10:00
parent f1c19ea64c
commit 41b286f80f
2 changed files with 4 additions and 2 deletions

View File

@@ -11,5 +11,5 @@
%table#enterprise-roles
%tbody
= render 'form'
%tr{"ng-repeat" => "enterprise_role in EnterpriseRoles.enterprise_roles | filter:query"}
%tr{"ng-repeat" => "enterprise_role in EnterpriseRoles.enterprise_roles | filter:query", id: "enterprise_role_{{enterprise_role.id}}"}
= render 'enterprise_role'

View File

@@ -71,7 +71,9 @@ feature %q{
visit admin_enterprise_roles_path
page.should have_relationship u, e
first("a.delete-enterprise-role").click
within("#enterprise_role_#{er.id}") do
find("a.delete-enterprise-role").click
end
page.should_not have_relationship u, e
EnterpriseRole.where(id: er.id).should be_empty