customer_vault 0.0.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +2 -2
- data/app/assets/images/customer_vault/icons/group-128.png +0 -0
- data/app/assets/images/customer_vault/icons/group-16.png +0 -0
- data/app/assets/images/customer_vault/icons/group-20.png +0 -0
- data/app/assets/images/customer_vault/icons/group-24.png +0 -0
- data/app/assets/images/customer_vault/icons/group-256.png +0 -0
- data/app/assets/images/customer_vault/icons/group-32.png +0 -0
- data/app/assets/images/customer_vault/icons/group-48.png +0 -0
- data/app/assets/images/customer_vault/icons/group-512.png +0 -0
- data/app/assets/images/customer_vault/icons/group-64.png +0 -0
- data/app/assets/stylesheets/customer_vault/{application.css → application.css.scss} +54 -5
- data/app/assets/stylesheets/customer_vault/{people.css → individuals.css} +1 -0
- data/app/assets/stylesheets/customer_vault/links.css +3 -0
- data/app/controllers/customer_vault/corporations_controller.rb +5 -7
- data/app/controllers/customer_vault/individuals_controller.rb +61 -0
- data/app/controllers/customer_vault/links_controller.rb +53 -0
- data/app/controllers/customer_vault/people_controller.rb +5 -54
- data/app/helpers/customer_vault/individuals_helper.rb +4 -0
- data/app/models/customer_vault/corporation.rb +5 -1
- data/app/models/customer_vault/individual.rb +15 -0
- data/app/models/customer_vault/link.rb +6 -0
- data/app/models/customer_vault/person.rb +13 -2
- data/app/views/customer_vault/corporations/_form.html.slim +28 -21
- data/app/views/customer_vault/corporations/_list_details.html.slim +29 -0
- data/app/views/customer_vault/corporations/_show_details.html.slim +36 -0
- data/app/views/customer_vault/corporations/edit.html.slim +22 -7
- data/app/views/customer_vault/corporations/new.html.slim +22 -5
- data/app/views/customer_vault/corporations/show.html.slim +41 -16
- data/app/views/customer_vault/{people → individuals}/_form.html.slim +16 -13
- data/app/views/customer_vault/individuals/_list_details.html.slim +39 -0
- data/app/views/customer_vault/individuals/_show_details.html.slim +52 -0
- data/app/views/customer_vault/individuals/edit.html.slim +23 -0
- data/app/views/customer_vault/individuals/new.html.slim +25 -0
- data/app/views/customer_vault/individuals/show.html.slim +42 -0
- data/app/views/customer_vault/layout/_form_error.html.slim +5 -0
- data/app/views/customer_vault/links/_aside.html.slim +4 -0
- data/app/views/customer_vault/links/_title.html.slim +3 -0
- data/app/views/customer_vault/links/edit.html.slim +30 -0
- data/app/views/customer_vault/links/new.html.slim +32 -0
- data/app/views/customer_vault/people/_select.html.slim +1 -0
- data/app/views/customer_vault/people/index.html.slim +29 -58
- data/config/cucumber.yml +8 -0
- data/config/routes.rb +7 -3
- data/db/migrate/20141016151955_change_people_to_individuals.rb +5 -0
- data/db/migrate/20141017085621_add_link.rb +12 -0
- data/lib/customer_vault/engine.rb +1 -0
- data/lib/customer_vault/version.rb +1 -1
- data/lib/tasks/cucumber.rake +65 -0
- data/spec/controllers/customer_vault/corporations_controller_spec.rb +3 -9
- data/spec/controllers/customer_vault/individuals_controller_spec.rb +156 -0
- data/spec/dummy/config/initializers/inflections.rb +1 -1
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20141013153526_create_dorsale_addresses.dorsale.rb +14 -0
- data/spec/dummy/db/migrate/20141014073225_add_polymorphic_fields_to_addresses.dorsale.rb +7 -0
- data/spec/dummy/db/schema.rb +24 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +22059 -0
- data/spec/dummy/log/test.log +35561 -0
- data/spec/dummy/tmp/cache/assets/development/sass/8f425af8af5194cec6da5008411d913407b2b024/application.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/03c4e7aa08d7d8a9e984a1e4eea01566 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/190ff82deecfbbe385c03ee8f8f3d2bf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/201cb9b3ce55f2f4dea6232ab8220cc3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2de61d7dd16d9e661790bc2973cc609a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/34d14962fde7e4fd6e2671844bcfaa78 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/39c67f2e186cde8355bb4533f16da267 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/47170c4182a8457e8d53507ea76fa76b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/471d75c3acc9522efc857f3be05b8375 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/49ff98533b89b4c09d5d1ecb9d45f207 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4b15ccd40e1d9deecfe3f523edb32a25 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4cd6d71a32c5da916328bfcfa972bd6c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5d0e775359a27eb80c837eee1bdd52cb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6355dea7c574d08602bd4e7e16a4c0d2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6847fabb2f2a2ff6011d957adb14a11e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/78ef508640527d1bb135c1077223fb7c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8e1929049a5ed5974d9bbb22b2c1bbc4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/92220e9fcf5e0717b9dc27169bf512e9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a774486cb0f2787691a7e585e008caea +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/aa60fba48cd1c25f138255570918b3db +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ac788eb47a519e5f2837cf9504d74f53 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ac8cf41eb80a554f4f15e80fa6e1ea58 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/df9e45a4bc905f29f8544c37dc9e9a18 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e5782a71fc01b88e6ac0c1c963bf7e3e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f516186931f15a3e5c86af1b1632d256 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/faca8abcf70e21e966cebb74604b729f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/8f425af8af5194cec6da5008411d913407b2b024/application.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/03c4e7aa08d7d8a9e984a1e4eea01566 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0e2a9601926844c961e7e97d32e775be +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/183bdc6b3ba504dc16e7b94a0f38fe06 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/190ff82deecfbbe385c03ee8f8f3d2bf +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1dc5cb7209fcdb172bfcde9c841c19e3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/201cb9b3ce55f2f4dea6232ab8220cc3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2b9d45522b3d1f3105e1c33e325dc6de +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2df425d43fef5663aadfc1bcc3087066 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2e7625733abd8050be92fe0ca1487fad +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/31876fc299b61887fae3e657773d7b15 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/338e8df8f4119a2a48b920613a8026a9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/34d14962fde7e4fd6e2671844bcfaa78 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/36adb34aba0d7825a4c9a4cf09c33572 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/39c67f2e186cde8355bb4533f16da267 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/40dbaa1db791d7be2279ddd67d33a1c4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/47170c4182a8457e8d53507ea76fa76b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/471d75c3acc9522efc857f3be05b8375 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/49ff98533b89b4c09d5d1ecb9d45f207 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4b15ccd40e1d9deecfe3f523edb32a25 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4cd6d71a32c5da916328bfcfa972bd6c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4d0235c7b6e465a89ad270537681be7f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/52f82b29641b7e97fabca983410c944d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5b95ef84d5ea3822d0364f3a6f5fa9ff +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5bc4ad6e6b955197190847aeff8df8bd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5d0e775359a27eb80c837eee1bdd52cb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6355dea7c574d08602bd4e7e16a4c0d2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/67a7734fae2f02d979ee498add75d3eb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6847fabb2f2a2ff6011d957adb14a11e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/78ef508640527d1bb135c1077223fb7c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/86a049860d05103d78ab689003d6ccb3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8e1929049a5ed5974d9bbb22b2c1bbc4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/92220e9fcf5e0717b9dc27169bf512e9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a5c73696137ab9dbdda376c8d7ffa3b9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a8e30d24c0bb5789981c4751cd2cdd76 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ac788eb47a519e5f2837cf9504d74f53 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ac8cf41eb80a554f4f15e80fa6e1ea58 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b10f86698e41bfdaafc9fb6bbf5bfbd9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c08aad292c2ca4aee63f927a45ba90ef +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c9db74506cdab0aec9f855c956f47726 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d04aeffd159aa29e71a9770dc8630259 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/db5f1ec4fd27d454a95b2824fff064d1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/df9e45a4bc905f29f8544c37dc9e9a18 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e5782a71fc01b88e6ac0c1c963bf7e3e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f516186931f15a3e5c86af1b1632d256 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/faca8abcf70e21e966cebb74604b729f +0 -0
- data/spec/dummy/tmp/capybara/capybara-201410171416122395182759.html +13 -0
- data/spec/factories/customer_vault_corporations.rb +4 -4
- data/spec/factories/{customer_vault_people.rb → customer_vault_individuals.rb} +1 -1
- data/spec/factories/customer_vault_links.rb +9 -0
- data/spec/helpers/customer_vault/{people_helper_spec.rb → individuals_helper_spec.rb} +3 -3
- data/spec/models/customer_vault/corporation_spec.rb +1 -0
- data/spec/models/customer_vault/individual_spec.rb +15 -0
- data/spec/models/customer_vault/link_spec.rb +13 -0
- data/spec/models/customer_vault/person_spec.rb +28 -6
- data/spec/routing/customer_vault/corporations_routing_spec.rb +22 -4
- data/spec/routing/customer_vault/individual_routing_spec.rb +54 -0
- data/spec/routing/customer_vault/people_routing_spec.rb +1 -26
- data/spec/spec_helper.rb +1 -0
- data/spec/views/customer_vault/individuals/edit.html.slim_spec.rb +47 -0
- data/spec/views/customer_vault/individuals/new.html.slim_spec.rb +47 -0
- data/spec/views/customer_vault/{people → individuals}/show.html.slim_spec.rb +2 -3
- metadata +226 -49
- data/app/assets/images/customer_vault/icons/add_person-128.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-20.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-24.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-256.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-32.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-48.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-512.png +0 -0
- data/app/assets/images/customer_vault/icons/add_person-64.png +0 -0
- data/app/helpers/customer_vault/people_helper.rb +0 -12
- data/app/views/customer_vault/corporations/index.html.slim +0 -27
- data/app/views/customer_vault/people/edit.html.slim +0 -21
- data/app/views/customer_vault/people/new.html.slim +0 -21
- data/app/views/customer_vault/people/show.html.slim +0 -57
- data/spec/controllers/customer_vault/people_controller_spec.rb +0 -163
- data/spec/views/customer_vault/corporations/index.html.slim_spec.rb +0 -29
- data/spec/views/customer_vault/people/edit.html.slim_spec.rb +0 -47
- data/spec/views/customer_vault/people/index.html.slim_spec.rb +0 -43
- data/spec/views/customer_vault/people/new.html.slim_spec.rb +0 -47
- /data/app/assets/images/customer_vault/icons/{people-128.png → individual-128.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-16.png → individual-16.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-20.png → individual-20.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-24.png → individual-24.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-256.png → individual-256.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-32.png → individual-32.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-48.png → individual-48.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-512.png → individual-512.png} +0 -0
- /data/app/assets/images/customer_vault/icons/{people-64.png → individual-64.png} +0 -0
- /data/app/assets/javascripts/customer_vault/{people.js → individuals.js} +0 -0
@@ -0,0 +1,156 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
4
|
+
# It demonstrates how one might use RSpec to specify the controller code that
|
5
|
+
# was generated by Rails when you ran the scaffold generator.
|
6
|
+
#
|
7
|
+
# It assumes that the implementation code is generated by the rails scaffold
|
8
|
+
# generator. If you are using any extension libraries to generate different
|
9
|
+
# controller code, this generated spec may or may not pass.
|
10
|
+
#
|
11
|
+
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
12
|
+
# of tools you can use to make these specs even more expressive, but we're
|
13
|
+
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
14
|
+
#
|
15
|
+
# Compared to earlier versions of this generator, there is very limited use of
|
16
|
+
# stubs and message expectations in this spec. Stubs are only used when there
|
17
|
+
# is no simpler way to get a handle on the object needed for the example.
|
18
|
+
# Message expectations are only used when there is no simpler way to specify
|
19
|
+
# that an instance is receiving a specific message.
|
20
|
+
|
21
|
+
module CustomerVault
|
22
|
+
RSpec.describe IndividualsController, :type => :controller do
|
23
|
+
|
24
|
+
routes { CustomerVault::Engine.routes }
|
25
|
+
|
26
|
+
# This should return the minimal set of attributes required to create a valid
|
27
|
+
# Individual. As you add validations to Individual, be sure to
|
28
|
+
# adjust the attributes here as well.
|
29
|
+
let(:valid_attributes) {
|
30
|
+
FactoryGirl.attributes_for(:customer_vault_individual)
|
31
|
+
}
|
32
|
+
|
33
|
+
let(:invalid_attributes) {
|
34
|
+
{ last_name: "" }
|
35
|
+
}
|
36
|
+
|
37
|
+
# This should return the minimal set of values that should be in the session
|
38
|
+
# in order to pass any filters (e.g. authentication) defined in
|
39
|
+
# IndividualsController. Be sure to keep this updated too.
|
40
|
+
let(:valid_session) { {} }
|
41
|
+
|
42
|
+
|
43
|
+
describe "GET show" do
|
44
|
+
it "assigns the requested individual as @individual" do
|
45
|
+
individual = Individual.create! valid_attributes
|
46
|
+
get :show, {:id => individual.to_param, :use_route => :customer_vault}, valid_session
|
47
|
+
expect(assigns(:individual)).to eq(individual)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "GET new" do
|
52
|
+
it "assigns a new individual as @individual" do
|
53
|
+
get :new, {}, valid_session
|
54
|
+
expect(assigns(:individual)).to be_a_new(Individual)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe "GET edit" do
|
59
|
+
it "assigns the requested individual as @individual" do
|
60
|
+
individual = Individual.create! valid_attributes
|
61
|
+
get :edit, {:id => individual.to_param}, valid_session
|
62
|
+
expect(assigns(:individual)).to eq(individual)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
describe "POST create" do
|
67
|
+
describe "with valid params" do
|
68
|
+
it "creates a new Individual" do
|
69
|
+
expect {
|
70
|
+
post :create, {:individual => valid_attributes}, valid_session
|
71
|
+
}.to change(Individual, :count).by(1)
|
72
|
+
end
|
73
|
+
|
74
|
+
it "assigns a newly created individual as @individual" do
|
75
|
+
post :create, {:individual => valid_attributes}, valid_session
|
76
|
+
expect(assigns(:individual)).to be_a(Individual)
|
77
|
+
expect(assigns(:individual)).to be_persisted
|
78
|
+
end
|
79
|
+
|
80
|
+
it "redirects to the created individual" do
|
81
|
+
post :create, {:individual => valid_attributes}, valid_session
|
82
|
+
expect(response).to redirect_to(Individual.last)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe "with invalid params" do
|
87
|
+
it "assigns a newly created but unsaved individual as @individual" do
|
88
|
+
post :create, {:individual => invalid_attributes}, valid_session
|
89
|
+
expect(assigns(:individual)).to be_a_new(Individual)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "re-renders the 'new' template" do
|
93
|
+
post :create, {:individual => invalid_attributes}, valid_session
|
94
|
+
expect(response).to render_template("new")
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
describe "PUT update" do
|
100
|
+
describe "with valid params" do
|
101
|
+
let(:new_attributes) {
|
102
|
+
{first_name: "Stroumph"}
|
103
|
+
}
|
104
|
+
|
105
|
+
it "updates the requested individual" do
|
106
|
+
individual = Individual.create! valid_attributes
|
107
|
+
put :update, {:id => individual.to_param, :individual => new_attributes}, valid_session
|
108
|
+
individual.reload
|
109
|
+
expect(individual.first_name).to eq("Stroumph")
|
110
|
+
end
|
111
|
+
|
112
|
+
it "assigns the requested individual as @individual" do
|
113
|
+
individual = Individual.create! valid_attributes
|
114
|
+
put :update, {:id => individual.to_param, :individual => valid_attributes}, valid_session
|
115
|
+
expect(assigns(:individual)).to eq(individual)
|
116
|
+
end
|
117
|
+
|
118
|
+
it "redirects to the individual" do
|
119
|
+
individual = Individual.create! valid_attributes
|
120
|
+
put :update, {:id => individual.to_param, :individual => valid_attributes}, valid_session
|
121
|
+
expect(response).to redirect_to(individual)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
describe "with invalid params" do
|
126
|
+
it "assigns the individual as @individual" do
|
127
|
+
individual = Individual.create! valid_attributes
|
128
|
+
put :update, {:id => individual.to_param, :individual => invalid_attributes}, valid_session
|
129
|
+
expect(assigns(:individual)).to eq(individual)
|
130
|
+
end
|
131
|
+
|
132
|
+
it "re-renders the 'edit' template" do
|
133
|
+
individual = Individual.create! valid_attributes
|
134
|
+
put :update, {:id => individual.to_param, :individual => invalid_attributes}, valid_session
|
135
|
+
expect(response).to render_template("edit")
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
describe "DELETE destroy" do
|
141
|
+
it "destroys the requested individual" do
|
142
|
+
individual = Individual.create! valid_attributes
|
143
|
+
expect {
|
144
|
+
delete :destroy, {:id => individual.to_param}, valid_session
|
145
|
+
}.to change(Individual, :count).by(-1)
|
146
|
+
end
|
147
|
+
|
148
|
+
it "redirects to the individuals list" do
|
149
|
+
individual = Individual.create! valid_attributes
|
150
|
+
delete :destroy, {:id => individual.to_param}, valid_session
|
151
|
+
expect(response).to redirect_to(people_url)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
end
|
156
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
7
|
# inflect.plural /^(ox)$/i, '\1en'
|
8
8
|
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular '
|
9
|
+
# inflect.irregular 'individual', 'individuals'
|
10
10
|
# inflect.uncountable %w( fish sheep )
|
11
11
|
# end
|
12
12
|
|
data/spec/dummy/config/routes.rb
CHANGED
Binary file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from dorsale (originally 20141010140200)
|
2
|
+
class CreateDorsaleAddresses < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :dorsale_addresses do |t|
|
5
|
+
t.string :street
|
6
|
+
t.string :street_bis
|
7
|
+
t.string :city
|
8
|
+
t.string :zip
|
9
|
+
t.string :country
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from dorsale (originally 20141014072756)
|
2
|
+
class AddPolymorphicFieldsToAddresses < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :dorsale_addresses, :addressable_id, :integer
|
5
|
+
add_column :dorsale_addresses, :addressable_type, :string
|
6
|
+
end
|
7
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20141017085621) do
|
15
15
|
|
16
16
|
create_table "customer_vault_corporations", force: true do |t|
|
17
17
|
t.string "name"
|
@@ -22,7 +22,7 @@ ActiveRecord::Schema.define(version: 20141010095816) do
|
|
22
22
|
t.datetime "updated_at"
|
23
23
|
end
|
24
24
|
|
25
|
-
create_table "
|
25
|
+
create_table "customer_vault_individuals", force: true do |t|
|
26
26
|
t.string "first_name"
|
27
27
|
t.string "last_name"
|
28
28
|
t.string "email"
|
@@ -37,4 +37,26 @@ ActiveRecord::Schema.define(version: 20141010095816) do
|
|
37
37
|
t.datetime "updated_at"
|
38
38
|
end
|
39
39
|
|
40
|
+
create_table "customer_vault_links", force: true do |t|
|
41
|
+
t.string "title"
|
42
|
+
t.integer "alice_id"
|
43
|
+
t.string "alice_type"
|
44
|
+
t.integer "bob_id"
|
45
|
+
t.string "bob_type"
|
46
|
+
t.datetime "created_at"
|
47
|
+
t.datetime "updated_at"
|
48
|
+
end
|
49
|
+
|
50
|
+
create_table "dorsale_addresses", force: true do |t|
|
51
|
+
t.string "street"
|
52
|
+
t.string "street_bis"
|
53
|
+
t.string "city"
|
54
|
+
t.string "zip"
|
55
|
+
t.string "country"
|
56
|
+
t.datetime "created_at"
|
57
|
+
t.datetime "updated_at"
|
58
|
+
t.integer "addressable_id"
|
59
|
+
t.string "addressable_type"
|
60
|
+
end
|
61
|
+
|
40
62
|
end
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|