require 'rails_helper'

RSpec.describe "settings/membership_actions/new", type: :view do
  before(:each) do
    assign(:settings_membership_action, Settings::MembershipAction.new(
      :membership_type => "MyString",
      :is_active => false,
      :gateway_communication_type => "MyString",
      :gateway_url => "MyString",
      :auth_token => "MyString",
      :merchant_account_id => "MyString",
      :created_by => "MyString",
      :additional_parameter => "MyString"
    ))
  end

  it "renders new settings_membership_action form" do
    render

    assert_select "form[action=?][method=?]", settings_membership_actions_path, "post" do

      assert_select "input[name=?]", "settings_membership_action[membership_type]"

      assert_select "input[name=?]", "settings_membership_action[is_active]"

      assert_select "input[name=?]", "settings_membership_action[gateway_communication_type]"

      assert_select "input[name=?]", "settings_membership_action[gateway_url]"

      assert_select "input[name=?]", "settings_membership_action[auth_token]"

      assert_select "input[name=?]", "settings_membership_action[merchant_account_id]"

      assert_select "input[name=?]", "settings_membership_action[created_by]"

      assert_select "input[name=?]", "settings_membership_action[additional_parameter]"
    end
  end
end
