require 'rails_helper'

RSpec.describe "metapurses/edit", type: :view do
  let(:metapurse) {
    Metapurse.create!(
      name: "MyString",
      data: "MyText"
    )
  }

  before(:each) do
    assign(:metapurse, metapurse)
  end

  it "renders the edit metapurse form" do
    render

    assert_select "form[action=?][method=?]", metapurse_path(metapurse), "post" do

      assert_select "input[name=?]", "metapurse[name]"

      assert_select "textarea[name=?]", "metapurse[data]"
    end
  end
end
