Updated to rails 6. Passing tests

This commit is contained in:
rebuilt 2021-10-14 19:22:26 +02:00
parent 3430069801
commit 770ebc580e
20 changed files with 33 additions and 34 deletions

View file

@ -21,7 +21,7 @@ RSpec.describe "categories/index", type: :view do
end
it "renders a list of categories" do
render
render(template: "categories/index.html.haml")
assert_select "tr>td", :text => "Name".to_s, :count => 2
assert_select "tr>td", :text => "Blurb".to_s, :count => 2
assert_select "tr>td", :text => "MyText".to_s, :count => 2

View file

@ -13,7 +13,7 @@ RSpec.describe "districts/show", type: :view do
end
it "renders attributes in <p>" do
render
render(template: "districts/show.html.haml")
expect(rendered).to match(/Milford/)
expect(rendered).to match(/2/)
3.times do |i|

View file

@ -17,7 +17,7 @@ RSpec.describe "question_lists/index", type: :view do
end
it "renders a list of question_lists" do
render
render(template: "question_lists/index.html.haml" )
assert_select "tr>td", :text => "Name".to_s, :count => 2
assert_select "tr>td", :text => "MyText".to_s, :count => 2
assert_select "tr>td", :text => "1,2,3".to_s, :count => 1

View file

@ -10,7 +10,7 @@ RSpec.describe "question_lists/show", type: :view do
end
it "renders attributes in <p>" do
render
render(template: "question_lists/show.html.haml")
expect(rendered).to match(/Name/)
expect(rendered).to match(/MyText/)
expect(rendered).to match(/MyText/)

View file

@ -25,7 +25,7 @@ RSpec.describe "questions/index", type: :view do
end
it "renders a list of questions" do
render
render(template: "questions/index.html.haml")
assert_select "tr>td", :text => "Text".to_s, :count => 2
assert_select "tr>td", :text => "Option1".to_s, :count => 2
assert_select "tr>td", :text => "Option2".to_s, :count => 2

View file

@ -15,7 +15,7 @@ RSpec.describe "questions/show", type: :view do
end
it "renders attributes in <p>" do
render
render(template: "questions/show.html.haml")
expect(rendered).to match(/School/)
expect(rendered).to match(/Question Text/)
expect(rendered).to match(/Option1/)

View file

@ -33,7 +33,7 @@ RSpec.describe "recipients/index", type: :view do
end
it "renders a list of recipients" do
render
render(template: "recipients/index.html.haml")
assert_select "tr>td", :text => "Name".to_s, :count => 2
assert_select "tr>td", :text => "Phone".to_s, :count => 2
assert_select "tr>td", :text => "Gender".to_s, :count => 2

View file

@ -10,8 +10,7 @@ RSpec.describe "schools/show", type: :view do
end
it "renders attributes in <p>" do
render
puts rendered.class
render(template: "schools/show.html.haml")
expect(rendered).to match(/School/)
expect(rendered).to match(/District/)
end