fixed conflict
This commit is contained in:
5
spec/controllers/api/origami/paypar_controller_spec.rb
Normal file
5
spec/controllers/api/origami/paypar_controller_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Api::Origami::PayparController, type: :controller do
|
||||
|
||||
end
|
||||
141
spec/controllers/membership_actions_controller_spec.rb
Normal file
141
spec/controllers/membership_actions_controller_spec.rb
Normal file
@@ -0,0 +1,141 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
||||
# It demonstrates how one might use RSpec to specify the controller code that
|
||||
# was generated by Rails when you ran the scaffold generator.
|
||||
#
|
||||
# It assumes that the implementation code is generated by the rails scaffold
|
||||
# generator. If you are using any extension libraries to generate different
|
||||
# controller code, this generated spec may or may not pass.
|
||||
#
|
||||
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
||||
# of tools you can use to make these specs even more expressive, but we're
|
||||
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
||||
#
|
||||
# Compared to earlier versions of this generator, there is very limited use of
|
||||
# stubs and message expectations in this spec. Stubs are only used when there
|
||||
# is no simpler way to get a handle on the object needed for the example.
|
||||
# Message expectations are only used when there is no simpler way to specify
|
||||
# that an instance is receiving a specific message.
|
||||
#
|
||||
# Also compared to earlier versions of this generator, there are no longer any
|
||||
# expectations of assigns and templates rendered. These features have been
|
||||
# removed from Rails core in Rails 5, but can be added back in via the
|
||||
# `rails-controller-testing` gem.
|
||||
|
||||
RSpec.describe MembershipActionsController, type: :controller do
|
||||
|
||||
# This should return the minimal set of attributes required to create a valid
|
||||
# MembershipAction. As you add validations to MembershipAction, be sure to
|
||||
# adjust the attributes here as well.
|
||||
let(:valid_attributes) {
|
||||
skip("Add a hash of attributes valid for your model")
|
||||
}
|
||||
|
||||
let(:invalid_attributes) {
|
||||
skip("Add a hash of attributes invalid for your model")
|
||||
}
|
||||
|
||||
# This should return the minimal set of values that should be in the session
|
||||
# in order to pass any filters (e.g. authentication) defined in
|
||||
# MembershipActionsController. Be sure to keep this updated too.
|
||||
let(:valid_session) { {} }
|
||||
|
||||
describe "GET #index" do
|
||||
it "returns a success response" do
|
||||
membership_action = MembershipAction.create! valid_attributes
|
||||
get :index, params: {}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #show" do
|
||||
it "returns a success response" do
|
||||
membership_action = MembershipAction.create! valid_attributes
|
||||
get :show, params: {id: membership_action.to_param}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #new" do
|
||||
it "returns a success response" do
|
||||
get :new, params: {}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #edit" do
|
||||
it "returns a success response" do
|
||||
membership_action = MembershipAction.create! valid_attributes
|
||||
get :edit, params: {id: membership_action.to_param}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "POST #create" do
|
||||
context "with valid params" do
|
||||
it "creates a new MembershipAction" do
|
||||
expect {
|
||||
post :create, params: {membership_action: valid_attributes}, session: valid_session
|
||||
}.to change(MembershipAction, :count).by(1)
|
||||
end
|
||||
|
||||
it "redirects to the created membership_action" do
|
||||
post :create, params: {membership_action: valid_attributes}, session: valid_session
|
||||
expect(response).to redirect_to(MembershipAction.last)
|
||||
end
|
||||
end
|
||||
|
||||
context "with invalid params" do
|
||||
it "returns a success response (i.e. to display the 'new' template)" do
|
||||
post :create, params: {membership_action: invalid_attributes}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "PUT #update" do
|
||||
context "with valid params" do
|
||||
let(:new_attributes) {
|
||||
skip("Add a hash of attributes valid for your model")
|
||||
}
|
||||
|
||||
it "updates the requested membership_action" do
|
||||
membership_action = MembershipAction.create! valid_attributes
|
||||
put :update, params: {id: membership_action.to_param, membership_action: new_attributes}, session: valid_session
|
||||
membership_action.reload
|
||||
skip("Add assertions for updated state")
|
||||
end
|
||||
|
||||
it "redirects to the membership_action" do
|
||||
membership_action = MembershipAction.create! valid_attributes
|
||||
put :update, params: {id: membership_action.to_param, membership_action: valid_attributes}, session: valid_session
|
||||
expect(response).to redirect_to(membership_action)
|
||||
end
|
||||
end
|
||||
|
||||
context "with invalid params" do
|
||||
it "returns a success response (i.e. to display the 'edit' template)" do
|
||||
membership_action = MembershipAction.create! valid_attributes
|
||||
put :update, params: {id: membership_action.to_param, membership_action: invalid_attributes}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "DELETE #destroy" do
|
||||
it "destroys the requested membership_action" do
|
||||
membership_action = MembershipAction.create! valid_attributes
|
||||
expect {
|
||||
delete :destroy, params: {id: membership_action.to_param}, session: valid_session
|
||||
}.to change(MembershipAction, :count).by(-1)
|
||||
end
|
||||
|
||||
it "redirects to the membership_actions list" do
|
||||
membership_action = MembershipAction.create! valid_attributes
|
||||
delete :destroy, params: {id: membership_action.to_param}, session: valid_session
|
||||
expect(response).to redirect_to(membership_actions_url)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
5
spec/controllers/origami/paypar_controller_spec.rb
Normal file
5
spec/controllers/origami/paypar_controller_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Origami::PayparController, type: :controller do
|
||||
|
||||
end
|
||||
141
spec/controllers/settings/membership_actions_controller_spec.rb
Normal file
141
spec/controllers/settings/membership_actions_controller_spec.rb
Normal file
@@ -0,0 +1,141 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
||||
# It demonstrates how one might use RSpec to specify the controller code that
|
||||
# was generated by Rails when you ran the scaffold generator.
|
||||
#
|
||||
# It assumes that the implementation code is generated by the rails scaffold
|
||||
# generator. If you are using any extension libraries to generate different
|
||||
# controller code, this generated spec may or may not pass.
|
||||
#
|
||||
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
||||
# of tools you can use to make these specs even more expressive, but we're
|
||||
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
||||
#
|
||||
# Compared to earlier versions of this generator, there is very limited use of
|
||||
# stubs and message expectations in this spec. Stubs are only used when there
|
||||
# is no simpler way to get a handle on the object needed for the example.
|
||||
# Message expectations are only used when there is no simpler way to specify
|
||||
# that an instance is receiving a specific message.
|
||||
#
|
||||
# Also compared to earlier versions of this generator, there are no longer any
|
||||
# expectations of assigns and templates rendered. These features have been
|
||||
# removed from Rails core in Rails 5, but can be added back in via the
|
||||
# `rails-controller-testing` gem.
|
||||
|
||||
RSpec.describe Settings::MembershipActionsController, type: :controller do
|
||||
|
||||
# This should return the minimal set of attributes required to create a valid
|
||||
# Settings::MembershipAction. As you add validations to Settings::MembershipAction, be sure to
|
||||
# adjust the attributes here as well.
|
||||
let(:valid_attributes) {
|
||||
skip("Add a hash of attributes valid for your model")
|
||||
}
|
||||
|
||||
let(:invalid_attributes) {
|
||||
skip("Add a hash of attributes invalid for your model")
|
||||
}
|
||||
|
||||
# This should return the minimal set of values that should be in the session
|
||||
# in order to pass any filters (e.g. authentication) defined in
|
||||
# Settings::MembershipActionsController. Be sure to keep this updated too.
|
||||
let(:valid_session) { {} }
|
||||
|
||||
describe "GET #index" do
|
||||
it "returns a success response" do
|
||||
membership_action = Settings::MembershipAction.create! valid_attributes
|
||||
get :index, params: {}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #show" do
|
||||
it "returns a success response" do
|
||||
membership_action = Settings::MembershipAction.create! valid_attributes
|
||||
get :show, params: {id: membership_action.to_param}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #new" do
|
||||
it "returns a success response" do
|
||||
get :new, params: {}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #edit" do
|
||||
it "returns a success response" do
|
||||
membership_action = Settings::MembershipAction.create! valid_attributes
|
||||
get :edit, params: {id: membership_action.to_param}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
describe "POST #create" do
|
||||
context "with valid params" do
|
||||
it "creates a new Settings::MembershipAction" do
|
||||
expect {
|
||||
post :create, params: {settings_membership_action: valid_attributes}, session: valid_session
|
||||
}.to change(Settings::MembershipAction, :count).by(1)
|
||||
end
|
||||
|
||||
it "redirects to the created settings_membership_action" do
|
||||
post :create, params: {settings_membership_action: valid_attributes}, session: valid_session
|
||||
expect(response).to redirect_to(Settings::MembershipAction.last)
|
||||
end
|
||||
end
|
||||
|
||||
context "with invalid params" do
|
||||
it "returns a success response (i.e. to display the 'new' template)" do
|
||||
post :create, params: {settings_membership_action: invalid_attributes}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "PUT #update" do
|
||||
context "with valid params" do
|
||||
let(:new_attributes) {
|
||||
skip("Add a hash of attributes valid for your model")
|
||||
}
|
||||
|
||||
it "updates the requested settings_membership_action" do
|
||||
membership_action = Settings::MembershipAction.create! valid_attributes
|
||||
put :update, params: {id: membership_action.to_param, settings_membership_action: new_attributes}, session: valid_session
|
||||
membership_action.reload
|
||||
skip("Add assertions for updated state")
|
||||
end
|
||||
|
||||
it "redirects to the settings_membership_action" do
|
||||
membership_action = Settings::MembershipAction.create! valid_attributes
|
||||
put :update, params: {id: membership_action.to_param, settings_membership_action: valid_attributes}, session: valid_session
|
||||
expect(response).to redirect_to(membership_action)
|
||||
end
|
||||
end
|
||||
|
||||
context "with invalid params" do
|
||||
it "returns a success response (i.e. to display the 'edit' template)" do
|
||||
membership_action = Settings::MembershipAction.create! valid_attributes
|
||||
put :update, params: {id: membership_action.to_param, settings_membership_action: invalid_attributes}, session: valid_session
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "DELETE #destroy" do
|
||||
it "destroys the requested settings_membership_action" do
|
||||
membership_action = Settings::MembershipAction.create! valid_attributes
|
||||
expect {
|
||||
delete :destroy, params: {id: membership_action.to_param}, session: valid_session
|
||||
}.to change(Settings::MembershipAction, :count).by(-1)
|
||||
end
|
||||
|
||||
it "redirects to the settings_membership_actions list" do
|
||||
membership_action = Settings::MembershipAction.create! valid_attributes
|
||||
delete :destroy, params: {id: membership_action.to_param}, session: valid_session
|
||||
expect(response).to redirect_to(settings_membership_actions_url)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
15
spec/helpers/api/origami/paypar_helper_spec.rb
Normal file
15
spec/helpers/api/origami/paypar_helper_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# Specs in this file have access to a helper object that includes
|
||||
# the Api::Origami::PayparHelper. For example:
|
||||
#
|
||||
# describe Api::Origami::PayparHelper do
|
||||
# describe "string concat" do
|
||||
# it "concats two strings with spaces" do
|
||||
# expect(helper.concat_strings("this","that")).to eq("this that")
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
RSpec.describe Api::Origami::PayparHelper, type: :helper do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
15
spec/helpers/membership_actions_helper_spec.rb
Normal file
15
spec/helpers/membership_actions_helper_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# Specs in this file have access to a helper object that includes
|
||||
# the MembershipActionsHelper. For example:
|
||||
#
|
||||
# describe MembershipActionsHelper do
|
||||
# describe "string concat" do
|
||||
# it "concats two strings with spaces" do
|
||||
# expect(helper.concat_strings("this","that")).to eq("this that")
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
RSpec.describe MembershipActionsHelper, type: :helper do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
15
spec/helpers/origami/paypar_helper_spec.rb
Normal file
15
spec/helpers/origami/paypar_helper_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# Specs in this file have access to a helper object that includes
|
||||
# the Origami::PayparHelper. For example:
|
||||
#
|
||||
# describe Origami::PayparHelper do
|
||||
# describe "string concat" do
|
||||
# it "concats two strings with spaces" do
|
||||
# expect(helper.concat_strings("this","that")).to eq("this that")
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
RSpec.describe Origami::PayparHelper, type: :helper do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
15
spec/helpers/settings/membership_actions_helper_spec.rb
Normal file
15
spec/helpers/settings/membership_actions_helper_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'rails_helper'
|
||||
|
||||
# Specs in this file have access to a helper object that includes
|
||||
# the Settings::MembershipActionsHelper. For example:
|
||||
#
|
||||
# describe Settings::MembershipActionsHelper do
|
||||
# describe "string concat" do
|
||||
# it "concats two strings with spaces" do
|
||||
# expect(helper.concat_strings("this","that")).to eq("this that")
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
RSpec.describe Settings::MembershipActionsHelper, type: :helper do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
5
spec/models/membership_action_spec.rb
Normal file
5
spec/models/membership_action_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe MembershipAction, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
5
spec/models/settings/membership_action_spec.rb
Normal file
5
spec/models/settings/membership_action_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Settings::MembershipAction, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
10
spec/requests/membership_actions_spec.rb
Normal file
10
spec/requests/membership_actions_spec.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "MembershipActions", type: :request do
|
||||
describe "GET /membership_actions" do
|
||||
it "works! (now write some real specs)" do
|
||||
get membership_actions_path
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
end
|
||||
end
|
||||
10
spec/requests/settings/settings_membership_actions_spec.rb
Normal file
10
spec/requests/settings/settings_membership_actions_spec.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "Settings::MembershipActions", type: :request do
|
||||
describe "GET /settings_membership_actions" do
|
||||
it "works! (now write some real specs)" do
|
||||
get settings_membership_actions_path
|
||||
expect(response).to have_http_status(200)
|
||||
end
|
||||
end
|
||||
end
|
||||
39
spec/routing/membership_actions_routing_spec.rb
Normal file
39
spec/routing/membership_actions_routing_spec.rb
Normal file
@@ -0,0 +1,39 @@
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe MembershipActionsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/membership_actions").to route_to("membership_actions#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/membership_actions/new").to route_to("membership_actions#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/membership_actions/1").to route_to("membership_actions#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/membership_actions/1/edit").to route_to("membership_actions#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/membership_actions").to route_to("membership_actions#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/membership_actions/1").to route_to("membership_actions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/membership_actions/1").to route_to("membership_actions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/membership_actions/1").to route_to("membership_actions#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
39
spec/routing/settings/membership_actions_routing_spec.rb
Normal file
39
spec/routing/settings/membership_actions_routing_spec.rb
Normal file
@@ -0,0 +1,39 @@
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe Settings::MembershipActionsController, type: :routing do
|
||||
describe "routing" do
|
||||
|
||||
it "routes to #index" do
|
||||
expect(:get => "/settings/membership_actions").to route_to("settings/membership_actions#index")
|
||||
end
|
||||
|
||||
it "routes to #new" do
|
||||
expect(:get => "/settings/membership_actions/new").to route_to("settings/membership_actions#new")
|
||||
end
|
||||
|
||||
it "routes to #show" do
|
||||
expect(:get => "/settings/membership_actions/1").to route_to("settings/membership_actions#show", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #edit" do
|
||||
expect(:get => "/settings/membership_actions/1/edit").to route_to("settings/membership_actions#edit", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #create" do
|
||||
expect(:post => "/settings/membership_actions").to route_to("settings/membership_actions#create")
|
||||
end
|
||||
|
||||
it "routes to #update via PUT" do
|
||||
expect(:put => "/settings/membership_actions/1").to route_to("settings/membership_actions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #update via PATCH" do
|
||||
expect(:patch => "/settings/membership_actions/1").to route_to("settings/membership_actions#update", :id => "1")
|
||||
end
|
||||
|
||||
it "routes to #destroy" do
|
||||
expect(:delete => "/settings/membership_actions/1").to route_to("settings/membership_actions#destroy", :id => "1")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
39
spec/views/membership_actions/edit.html.erb_spec.rb
Normal file
39
spec/views/membership_actions/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,39 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "membership_actions/edit", type: :view do
|
||||
before(:each) do
|
||||
@membership_action = assign(:membership_action, MembershipAction.create!(
|
||||
: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 => ""
|
||||
))
|
||||
end
|
||||
|
||||
it "renders the edit membership_action form" do
|
||||
render
|
||||
|
||||
assert_select "form[action=?][method=?]", membership_action_path(@membership_action), "post" do
|
||||
|
||||
assert_select "input[name=?]", "membership_action[membership_type]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[is_active]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[gateway_communication_type]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[gateway_url]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[auth_token]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[merchant_account_id]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[created_by]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[additional_parameter]"
|
||||
end
|
||||
end
|
||||
end
|
||||
40
spec/views/membership_actions/index.html.erb_spec.rb
Normal file
40
spec/views/membership_actions/index.html.erb_spec.rb
Normal 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
|
||||
0
spec/views/membership_actions/index.json.jbuilder
Normal file
0
spec/views/membership_actions/index.json.jbuilder
Normal file
39
spec/views/membership_actions/new.html.erb_spec.rb
Normal file
39
spec/views/membership_actions/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,39 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "membership_actions/new", type: :view do
|
||||
before(:each) do
|
||||
assign(:membership_action, 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 => ""
|
||||
))
|
||||
end
|
||||
|
||||
it "renders new membership_action form" do
|
||||
render
|
||||
|
||||
assert_select "form[action=?][method=?]", membership_actions_path, "post" do
|
||||
|
||||
assert_select "input[name=?]", "membership_action[membership_type]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[is_active]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[gateway_communication_type]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[gateway_url]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[auth_token]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[merchant_account_id]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[created_by]"
|
||||
|
||||
assert_select "input[name=?]", "membership_action[additional_parameter]"
|
||||
end
|
||||
end
|
||||
end
|
||||
28
spec/views/membership_actions/show.html.erb_spec.rb
Normal file
28
spec/views/membership_actions/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "membership_actions/show", type: :view do
|
||||
before(:each) do
|
||||
@membership_action = assign(:membership_action, 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 attributes in <p>" do
|
||||
render
|
||||
expect(rendered).to match(/Membership Type/)
|
||||
expect(rendered).to match(/false/)
|
||||
expect(rendered).to match(/Gateway Communication Type/)
|
||||
expect(rendered).to match(/Gateway Url/)
|
||||
expect(rendered).to match(/Auth Token/)
|
||||
expect(rendered).to match(/Merchant Account/)
|
||||
expect(rendered).to match(/Created By/)
|
||||
expect(rendered).to match(//)
|
||||
end
|
||||
end
|
||||
39
spec/views/settings/membership_actions/edit.html.erb_spec.rb
Normal file
39
spec/views/settings/membership_actions/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,39 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "settings/membership_actions/edit", type: :view do
|
||||
before(:each) do
|
||||
@settings_membership_action = assign(:settings_membership_action, Settings::MembershipAction.create!(
|
||||
: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 the edit settings_membership_action form" do
|
||||
render
|
||||
|
||||
assert_select "form[action=?][method=?]", settings_membership_action_path(@settings_membership_action), "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
|
||||
@@ -0,0 +1,40 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "settings/membership_actions/index", type: :view do
|
||||
before(:each) do
|
||||
assign(:settings_membership_actions, [
|
||||
Settings::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 => "Additional Parameter"
|
||||
),
|
||||
Settings::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 => "Additional Parameter"
|
||||
)
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of settings/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 => "Additional Parameter".to_s, :count => 2
|
||||
end
|
||||
end
|
||||
39
spec/views/settings/membership_actions/new.html.erb_spec.rb
Normal file
39
spec/views/settings/membership_actions/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,39 @@
|
||||
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
|
||||
28
spec/views/settings/membership_actions/show.html.erb_spec.rb
Normal file
28
spec/views/settings/membership_actions/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "settings/membership_actions/show", type: :view do
|
||||
before(:each) do
|
||||
@settings_membership_action = assign(:settings_membership_action, Settings::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 => "Additional Parameter"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
expect(rendered).to match(/Membership Type/)
|
||||
expect(rendered).to match(/false/)
|
||||
expect(rendered).to match(/Gateway Communication Type/)
|
||||
expect(rendered).to match(/Gateway Url/)
|
||||
expect(rendered).to match(/Auth Token/)
|
||||
expect(rendered).to match(/Merchant Account/)
|
||||
expect(rendered).to match(/Created By/)
|
||||
expect(rendered).to match(/Additional Parameter/)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user