Files
sx-fc/spec/views/settings/payment_method_settings/new.html.erb_spec.rb
Min Zeya Phyo 0af7d78c3c scaffold models
2017-04-20 17:01:14 +06:30

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