34 lines
1.4 KiB
Ruby
34 lines
1.4 KiB
Ruby
require 'rails_helper'
|
|
|
|
RSpec.describe "settings/payment_method_settings/new", type: :view do
|
|
before(:each) do
|
|
assign(:settings_payment_method_setting, Settings::PaymentMethodSetting.new(
|
|
:payment_method => "MyString",
|
|
:is_active => false,
|
|
:gateway_communication_type => "MyString",
|
|
:gateway_url => "MyString",
|
|
:auth_token => "MyString",
|
|
:merchant_account => nil
|
|
))
|
|
end
|
|
|
|
it "renders new settings_payment_method_setting form" do
|
|
render
|
|
|
|
assert_select "form[action=?][method=?]", settings_payment_method_settings_path, "post" do
|
|
|
|
assert_select "input#settings_payment_method_setting_payment_method[name=?]", "settings_payment_method_setting[payment_method]"
|
|
|
|
assert_select "input#settings_payment_method_setting_is_active[name=?]", "settings_payment_method_setting[is_active]"
|
|
|
|
assert_select "input#settings_payment_method_setting_gateway_communication_type[name=?]", "settings_payment_method_setting[gateway_communication_type]"
|
|
|
|
assert_select "input#settings_payment_method_setting_gateway_url[name=?]", "settings_payment_method_setting[gateway_url]"
|
|
|
|
assert_select "input#settings_payment_method_setting_auth_token[name=?]", "settings_payment_method_setting[auth_token]"
|
|
|
|
assert_select "input#settings_payment_method_setting_merchant_account_id[name=?]", "settings_payment_method_setting[merchant_account_id]"
|
|
end
|
|
end
|
|
end
|