migrate from turbolinks to turbo
This commit is contained in:
18
spec/views/rp_worlds/edit.html.erb_spec.rb
Normal file
18
spec/views/rp_worlds/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "rp_worlds/edit", type: :view do
|
||||
before(:each) do
|
||||
@rp_world = assign(:rp_world, RpWorld.create!(
|
||||
name: "MyString"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders the edit rp_world form" do
|
||||
render
|
||||
|
||||
assert_select "form[action=?][method=?]", rp_world_path(@rp_world), "post" do
|
||||
|
||||
assert_select "input[name=?]", "rp_world[name]"
|
||||
end
|
||||
end
|
||||
end
|
||||
19
spec/views/rp_worlds/index.html.erb_spec.rb
Normal file
19
spec/views/rp_worlds/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "rp_worlds/index", type: :view do
|
||||
before(:each) do
|
||||
assign(:rp_worlds, [
|
||||
RpWorld.create!(
|
||||
name: "Name"
|
||||
),
|
||||
RpWorld.create!(
|
||||
name: "Name"
|
||||
)
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of rp_worlds" do
|
||||
render
|
||||
assert_select "tr>td", text: "Name".to_s, count: 2
|
||||
end
|
||||
end
|
||||
18
spec/views/rp_worlds/new.html.erb_spec.rb
Normal file
18
spec/views/rp_worlds/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "rp_worlds/new", type: :view do
|
||||
before(:each) do
|
||||
assign(:rp_world, RpWorld.new(
|
||||
name: "MyString"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders new rp_world form" do
|
||||
render
|
||||
|
||||
assert_select "form[action=?][method=?]", rp_worlds_path, "post" do
|
||||
|
||||
assert_select "input[name=?]", "rp_world[name]"
|
||||
end
|
||||
end
|
||||
end
|
||||
14
spec/views/rp_worlds/show.html.erb_spec.rb
Normal file
14
spec/views/rp_worlds/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "rp_worlds/show", type: :view do
|
||||
before(:each) do
|
||||
@rp_world = assign(:rp_world, RpWorld.create!(
|
||||
name: "Name"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
expect(rendered).to match(/Name/)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user