payment_setting

This commit is contained in:
Moe Su
2017-06-08 17:57:29 +06:30
parent b57e24c076
commit 74b0550c30
46 changed files with 960 additions and 22 deletions

View File

@@ -0,0 +1,40 @@
require 'rails_helper'
RSpec.describe "membership_actions/index", type: :view do
before(:each) do
assign(:membership_actions, [
MembershipAction.create!(
:membership_type => "Membership Type",
:is_active => false,
:gateway_communication_type => "Gateway Communication Type",
:gateway_url => "Gateway Url",
:auth_token => "Auth Token",
:merchant_account_id => "Merchant Account",
:created_by => "Created By",
:additional_parameter => ""
),
MembershipAction.create!(
:membership_type => "Membership Type",
:is_active => false,
:gateway_communication_type => "Gateway Communication Type",
:gateway_url => "Gateway Url",
:auth_token => "Auth Token",
:merchant_account_id => "Merchant Account",
:created_by => "Created By",
:additional_parameter => ""
)
])
end
it "renders a list of membership_actions" do
render
assert_select "tr>td", :text => "Membership Type".to_s, :count => 2
assert_select "tr>td", :text => false.to_s, :count => 2
assert_select "tr>td", :text => "Gateway Communication Type".to_s, :count => 2
assert_select "tr>td", :text => "Gateway Url".to_s, :count => 2
assert_select "tr>td", :text => "Auth Token".to_s, :count => 2
assert_select "tr>td", :text => "Merchant Account".to_s, :count => 2
assert_select "tr>td", :text => "Created By".to_s, :count => 2
assert_select "tr>td", :text => "".to_s, :count => 2
end
end