Sha256: f8a1a40bfe0934233423d8c6cf94195d7a4509ca6a30ad5040f88e801575ea0b

Contents?: true

Size: 498 Bytes

Versions: 2

Compression:

Stored size: 498 Bytes

Contents

require 'rails_helper'

RSpec.describe 'posts/edit', type: :view do
  before(:each) do
    @post = assign(:post, Post.create!(
                            title: 'MyString',
                            body: 'MyText'
    ))
  end

  it 'renders the edit post form' do
    render

    assert_select 'form[action=?][method=?]', post_path(@post), 'post' do
      assert_select 'input#post_title[name=?]', 'post[title]'

      assert_select 'textarea#post_body[name=?]', 'post[body]'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ecm_tags-2.2.1 spec/dummy/spec/views/posts/edit.html.erb_spec.rb
ecm_tags-2.2.0 spec/dummy/spec/views/posts/edit.html.erb_spec.rb