thirteen-tien-len/spec/views/profiles/show.html.haml_spec.rb
2023-11-06 17:21:23 +00:00

21 lines
437 B
Ruby

require 'rails_helper'
RSpec.describe "profiles/show", type: :view do
before(:each) do
assign(:profile, Profile.create!(
user: nil,
name: "Name",
summary: "Summary",
about: "MyText"
))
end
it "renders attributes in <p>" do
render
expect(rendered).to match(//)
expect(rendered).to match(/Name/)
expect(rendered).to match(/Summary/)
expect(rendered).to match(/MyText/)
end
end