mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-24 16:58:35 -04:00
update specs for admin roles
This commit is contained in:
@@ -9,11 +9,11 @@ describe 'admin/index.html.haml', type: "view" do
|
||||
end
|
||||
|
||||
it "includes links to manage various things" do
|
||||
assert_select "a", href: roles_path
|
||||
assert_select "a", href: admin_roles_path
|
||||
assert_select "a", href: forums_path
|
||||
end
|
||||
|
||||
it "has a link to newsletter subscribers" do
|
||||
rendered.should have_content "Newsletter subscribers"
|
||||
expeect(rendered).to have_content "Newsletter subscribers"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,6 +11,6 @@ describe 'admin/newsletter.html.haml', type: "view" do
|
||||
end
|
||||
|
||||
it "lists newsletter subscribers by email" do
|
||||
rendered.should have_content @subscriber.email
|
||||
expect(rendered).to have_content @subscriber.email
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,8 +10,7 @@ describe "admin/roles/edit" do
|
||||
it "renders the edit role form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form", action: roles_path(@role), method: "post" do
|
||||
assert_select "form", action: admin_roles_path(@role), method: "post" do
|
||||
assert_select "input#role_name", name: "role[name]"
|
||||
assert_select "textarea#role_description", name: "role[description]"
|
||||
end
|
||||
|
||||
@@ -11,7 +11,7 @@ describe "admin/roles/new" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form", action: roles_path, method: "post" do
|
||||
assert_select "form", action: admin_roles_path, method: "post" do
|
||||
assert_select "input#role_name", name: "role[name]"
|
||||
assert_select "textarea#role_description", name: "role[description]"
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ describe "admin/roles/show" do
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
rendered.should match(/Name/)
|
||||
rendered.should match(/MyText/)
|
||||
expect(rendered).to match(/Name/)
|
||||
expect(rendered).to match(/MyText/)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user