adherent 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/adherent/payments_controller.rb +2 -0
- data/app/models/adherent/adhesion.rb +11 -4
- data/lib/adherent/version.rb +1 -1
- data/test/dummy/app/controllers/application_controller.rb +1 -6
- data/test/dummy/app/models/adherent/organism.rb +7 -0
- data/test/dummy/db/schema.rb +1 -1
- data/test/dummy/log/development.log +1850 -99224
- data/test/dummy/log/test.log +12091 -4755
- data/test/dummy/tmp/cache/assets/D0B/520/sprockets%2Fa659c61ab2078241e32ebaf671f87e41 +0 -0
- data/test/dummy/tmp/cache/assets/D48/B20/sprockets%2F5768e2da329c68c958acde5d26124de0 +0 -0
- data/test/dummy/tmp/cache/assets/D4B/C40/sprockets%2F2428f6c76bb4a5efb583e158681fb73d +0 -0
- data/test/dummy/tmp/cache/assets/D73/0F0/sprockets%2F5ba6d2f108d33e64b84fc4dd91960d6e +0 -0
- data/test/dummy/tmp/cache/assets/DB0/A80/sprockets%2F9fdb8e951f975dae3836c2ccf0f65a34 +0 -0
- data/test/fixtures/adherent/adhesions.yml +7 -5
- data/test/fixtures/adherent/coords.yml +2 -2
- data/test/fixtures/adherent/members.yml +4 -4
- data/test/fixtures/adherent/payments.yml +3 -6
- data/test/functional/adherent/adhesions_controller_test.rb +32 -0
- data/test/functional/adherent/coords_controller_test.rb +3 -3
- data/test/functional/adherent/members_controller_test.rb +7 -6
- data/test/functional/adherent/payments_controller_test.rb +10 -4
- data/test/functional/adherent/reglements_controller_test.rb +12 -8
- data/test/unit/adherent/adhesion_test.rb +8 -7
- data/test/unit/adherent/member_test.rb +2 -2
- metadata +6 -22
- data/test/dummy/db/migrate/20130810081835_create_adherent_members.adherent.rb +0 -13
- data/test/dummy/db/migrate/20130810081836_create_adherent_coords.adherent.rb +0 -17
- data/test/dummy/db/migrate/20130810081837_create_adherent_adhesions.adherent.rb +0 -15
- data/test/dummy/db/migrate/20130810081838_create_adherent_payments.adherent.rb +0 -18
- data/test/dummy/db/migrate/20130810081839_create_adherent_reglements.adherent.rb +0 -14
- data/test/dummy/db/migrate/20130810081840_add_organism_id_to_adherent_members.adherent.rb +0 -6
- data/test/dummy/test/functional/organisms_controller_test.rb +0 -49
- data/test/dummy/test/unit/helpers/organisms_helper_test.rb +0 -4
- data/test/dummy/test/unit/organism_test.rb +0 -7
- data/test/functional/adherent/adhesion_controller_test.rb +0 -26
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -2,10 +2,12 @@
|
|
2
2
|
|
3
3
|
one:
|
4
4
|
from_date: 2013-08-06
|
5
|
-
to_date: 2013-
|
6
|
-
|
5
|
+
to_date: 2013-09-05
|
6
|
+
amount: 8
|
7
|
+
member_id: <%= ActiveRecord::Fixtures.identify(:jcl) %>
|
7
8
|
|
8
9
|
two:
|
9
|
-
from_date: 2013-
|
10
|
-
to_date:
|
11
|
-
|
10
|
+
from_date: 2013-09-06
|
11
|
+
to_date: 2014-08-05
|
12
|
+
amount: 125.23
|
13
|
+
member_id: <%= ActiveRecord::Fixtures.identify(:jcl) %>
|
@@ -8,7 +8,7 @@ one:
|
|
8
8
|
address: MyText
|
9
9
|
zip: MyString
|
10
10
|
city: MyString
|
11
|
-
|
11
|
+
member_id: <%= ActiveRecord::Fixtures.identify(:jcl) %>
|
12
12
|
|
13
13
|
two:
|
14
14
|
mail: MyString
|
@@ -18,4 +18,4 @@ two:
|
|
18
18
|
address: MyText
|
19
19
|
zip: MyString
|
20
20
|
city: MyString
|
21
|
-
|
21
|
+
member_id: <%= ActiveRecord::Fixtures.identify(:jul) %>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
2
2
|
|
3
|
-
|
3
|
+
jcl:
|
4
4
|
number: '001'
|
5
5
|
name: Lepage
|
6
6
|
forname: Jean Claude
|
7
7
|
birthdate: 1955-06-06
|
8
8
|
|
9
|
-
|
9
|
+
jul:
|
10
10
|
number: '002'
|
11
|
-
name:
|
12
|
-
forname:
|
11
|
+
name: Dupont
|
12
|
+
forname: Jules
|
13
13
|
birthdate: 1952-06-15
|
@@ -4,19 +4,16 @@ one:
|
|
4
4
|
date: '08/08/2013'
|
5
5
|
amount: 9.99
|
6
6
|
mode: Chèque
|
7
|
-
|
8
|
-
member:
|
7
|
+
member_id: <%= ActiveRecord::Fixtures.identify(:jcl) %>
|
9
8
|
|
10
9
|
two:
|
11
10
|
date: '08/08/2013'
|
12
11
|
amount: -9.99
|
13
12
|
mode: CB
|
14
|
-
|
15
|
-
member:
|
13
|
+
member_id:
|
16
14
|
|
17
15
|
invalid_mode:
|
18
16
|
date: '08/08/2013'
|
19
17
|
amount: 9.99
|
20
18
|
mode: Dessous de table
|
21
|
-
|
22
|
-
member:
|
19
|
+
member_id: <%= ActiveRecord::Fixtures.identify(:jcl) %>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Adherent
|
4
|
+
class AdhesionsControllerTest < ActionController::TestCase
|
5
|
+
setup do
|
6
|
+
@member = adherent_members(:jcl)
|
7
|
+
@adhesion = adherent_adhesions(:one)
|
8
|
+
@valid_attr = {}
|
9
|
+
end
|
10
|
+
|
11
|
+
test "should get index" do
|
12
|
+
get :index, {member_id:@member.id}, use_route: :adherent
|
13
|
+
assert_response :success
|
14
|
+
end
|
15
|
+
|
16
|
+
test "should get edit" do
|
17
|
+
get :edit, {member_id:@member.id, id:@adhesion.to_param}, use_route: :adherent
|
18
|
+
assert_response :success
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should get new" do
|
22
|
+
get :new, {member_id:@member.id}, use_route: :adherent
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
26
|
+
test "should get show" do
|
27
|
+
get :show,{member_id:@member.id, id:@adhesion.to_param}, use_route: :adherent
|
28
|
+
assert_response :success
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
@@ -4,7 +4,7 @@ module Adherent
|
|
4
4
|
class CoordsControllerTest < ActionController::TestCase
|
5
5
|
setup do
|
6
6
|
@coord = adherent_coords(:one)
|
7
|
-
@member = adherent_members(:
|
7
|
+
@member = adherent_members(:jcl)
|
8
8
|
end
|
9
9
|
|
10
10
|
test "should get index" do
|
@@ -24,7 +24,7 @@ module Adherent
|
|
24
24
|
post :create, {member_id:@member, coord: { address: @coord.address, city: @coord.city, gsm: @coord.gsm, mail: @coord.mail, office: @coord.office, tel: @coord.tel, zip: @coord.zip }}, use_route: :adherent
|
25
25
|
end
|
26
26
|
|
27
|
-
assert_redirected_to
|
27
|
+
assert_redirected_to new_member_adhesion_path(assigns(:member))
|
28
28
|
end
|
29
29
|
|
30
30
|
test "should show coord" do
|
@@ -39,7 +39,7 @@ module Adherent
|
|
39
39
|
|
40
40
|
test "should update coord" do
|
41
41
|
put :update, {member_id:@member, id: @coord, coord: { address: @coord.address, city: @coord.city, gsm: @coord.gsm, mail: @coord.mail, office: @coord.office, tel: @coord.tel, zip: @coord.zip }}, use_route: :adherent
|
42
|
-
assert_redirected_to
|
42
|
+
assert_redirected_to member_coord_path(assigns(:member))
|
43
43
|
end
|
44
44
|
|
45
45
|
test "should destroy coord" do
|
@@ -3,7 +3,8 @@ require 'test_helper'
|
|
3
3
|
module Adherent
|
4
4
|
class MembersControllerTest < ActionController::TestCase
|
5
5
|
setup do
|
6
|
-
@member = adherent_members(:
|
6
|
+
@member = adherent_members(:jcl)
|
7
|
+
@valid_attr = {number:'Adh002', name:'Haddock', forname:'Capitaine'}
|
7
8
|
end
|
8
9
|
|
9
10
|
test "should get index" do
|
@@ -19,7 +20,7 @@ module Adherent
|
|
19
20
|
|
20
21
|
test "should create member" do
|
21
22
|
assert_difference('Member.count') do
|
22
|
-
post :create, member:
|
23
|
+
post :create, member: @valid_attr,
|
23
24
|
use_route: :adherent
|
24
25
|
end
|
25
26
|
|
@@ -27,20 +28,20 @@ module Adherent
|
|
27
28
|
end
|
28
29
|
|
29
30
|
test "should show member" do
|
30
|
-
get :show, id: @member, use_route: :adherent
|
31
|
+
get :show, id: @member.id, use_route: :adherent
|
31
32
|
assert_response :success
|
32
33
|
end
|
33
34
|
|
34
35
|
test "should get edit" do
|
35
|
-
get :edit, id: @member, use_route: :adherent
|
36
|
+
get :edit, id: @member.to_param, use_route: :adherent
|
36
37
|
assert_response :success
|
37
38
|
end
|
38
39
|
|
39
40
|
test "should update member" do
|
40
|
-
put :update, id: @member,
|
41
|
+
put :update, id: @member.id,
|
41
42
|
member: { birthdate: @member.birthdate, forname: @member.forname, name: @member.name, number: @member.number },
|
42
43
|
use_route: :adherent
|
43
|
-
assert_redirected_to member_path(
|
44
|
+
assert_redirected_to member_path(@member.id)
|
44
45
|
end
|
45
46
|
|
46
47
|
test "should destroy member" do
|
@@ -2,23 +2,29 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Adherent
|
4
4
|
class PaymentsControllerTest < ActionController::TestCase
|
5
|
+
|
6
|
+
setup do
|
7
|
+
@member = adherent_members(:jcl)
|
8
|
+
@payment =adherent_payments(:one)
|
9
|
+
end
|
10
|
+
|
5
11
|
test "should get index" do
|
6
|
-
get :index
|
12
|
+
get :index, member_id:@member.to_param, use_route: :adherent
|
7
13
|
assert_response :success
|
8
14
|
end
|
9
15
|
|
10
16
|
test "should get new" do
|
11
|
-
get :new
|
17
|
+
get :new, member_id:@member.to_param, use_route: :adherent
|
12
18
|
assert_response :success
|
13
19
|
end
|
14
20
|
|
15
21
|
test "should get edit" do
|
16
|
-
get :edit
|
22
|
+
get :edit, {member_id:@member.to_param, id:@payment.to_param}, use_route: :adherent
|
17
23
|
assert_response :success
|
18
24
|
end
|
19
25
|
|
20
26
|
test "should get show" do
|
21
|
-
get :show
|
27
|
+
get :show, {member_id:@member.to_param, id:@payment.to_param}, use_route: :adherent
|
22
28
|
assert_response :success
|
23
29
|
end
|
24
30
|
|
@@ -2,20 +2,24 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Adherent
|
4
4
|
class ReglementsControllerTest < ActionController::TestCase
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
setup do
|
6
|
+
@payment = adherent_payments(:one)
|
7
|
+
@adhestion = adherent_adhesions(:one)
|
8
8
|
end
|
9
9
|
|
10
10
|
test "should get new" do
|
11
|
-
get :new
|
11
|
+
get :new, payment_id:@payment.to_param, use_route: :adherent
|
12
12
|
assert_response :success
|
13
13
|
end
|
14
|
-
|
15
|
-
test "should
|
16
|
-
|
17
|
-
|
14
|
+
|
15
|
+
test "should create" do
|
16
|
+
post :create, { payment_id:@payment.to_param,
|
17
|
+
:reglement=>{:adhesion_id=>@adhestion.id}}, use_route: :adherent
|
18
|
+
|
19
|
+
assert_redirected_to member_payments_path(@payment.member)
|
18
20
|
end
|
19
21
|
|
22
|
+
|
23
|
+
|
20
24
|
end
|
21
25
|
end
|
@@ -5,7 +5,7 @@ require 'test_helper'
|
|
5
5
|
module Adherent
|
6
6
|
class AdhesionTest < ActiveSupport::TestCase
|
7
7
|
test 'une adhésion valide' do
|
8
|
-
@ad = Adhesion.new(from_date:'01/08/2013', to_date:'31/08/2013')
|
8
|
+
@ad = Adhesion.new(from_date:'01/08/2013', to_date:'31/08/2013', amount:10.25)
|
9
9
|
@ad.member_id = 1
|
10
10
|
assert_equal true, @ad.valid?
|
11
11
|
end
|
@@ -17,17 +17,18 @@ module Adherent
|
|
17
17
|
end
|
18
18
|
|
19
19
|
test 'next_adhesion preremplit les champs' do
|
20
|
-
@m = adherent_members(:
|
20
|
+
@m = adherent_members(:jul)
|
21
21
|
na = @m.next_adhesion
|
22
|
-
assert_equal
|
22
|
+
assert_equal I18n::l(Date.today), na.from_date
|
23
23
|
end
|
24
24
|
|
25
25
|
test 'si une adhésion existe, next_adhesion preremplit avec la dernière adhésion' do
|
26
|
-
@m = adherent_members(:
|
27
|
-
@m.next_adhesion
|
28
|
-
|
26
|
+
@m = adherent_members(:jul)
|
27
|
+
next_adh = @m.next_adhesion
|
28
|
+
@m.next_adhesion.save!
|
29
|
+
first_adh = @m.adhesions(true).first
|
29
30
|
na = @m.next_adhesion
|
30
|
-
assert_equal na.from_date, I18n.l(
|
31
|
+
assert_equal na.from_date, I18n.l(first_adh.read_attribute(:to_date)+1)
|
31
32
|
end
|
32
33
|
|
33
34
|
|
@@ -3,13 +3,13 @@ require 'test_helper'
|
|
3
3
|
module Adherent
|
4
4
|
class MemberTest < ActiveSupport::TestCase
|
5
5
|
test 'un membre n est pas valide si son numéro existe déja' do
|
6
|
-
@m = adherent_members(:
|
6
|
+
@m = adherent_members(:jcl)
|
7
7
|
nm =Member.new(number:@m.number, name:@m.name, forname:@m.forname)
|
8
8
|
assert_equal false, nm.valid?
|
9
9
|
end
|
10
10
|
|
11
11
|
test 'mais l est si le numéro est différent' do
|
12
|
-
@m = adherent_members(:
|
12
|
+
@m = adherent_members(:jcl)
|
13
13
|
nm =Member.new(number:(@m.number + '1'), name:@m.name, forname:@m.forname)
|
14
14
|
assert_equal true, nm.valid?
|
15
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adherent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Claude Lepage
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -237,6 +237,7 @@ files:
|
|
237
237
|
- test/dummy/app/assets/stylesheets/scaffold.css
|
238
238
|
- test/dummy/app/assets/stylesheets/application.css
|
239
239
|
- test/dummy/app/models/organism.rb
|
240
|
+
- test/dummy/app/models/adherent/organism.rb
|
240
241
|
- test/dummy/app/views/layouts/adherent/_header.html.haml
|
241
242
|
- test/dummy/app/views/layouts/application.html.erb
|
242
243
|
- test/dummy/app/views/organisms/index.html.haml
|
@@ -248,10 +249,7 @@ files:
|
|
248
249
|
- test/dummy/app/controllers/application_controller.rb
|
249
250
|
- test/dummy/app/helpers/application_helper.rb
|
250
251
|
- test/dummy/app/helpers/organisms_helper.rb
|
251
|
-
- test/dummy/test/unit/organism_test.rb
|
252
|
-
- test/dummy/test/unit/helpers/organisms_helper_test.rb
|
253
252
|
- test/dummy/test/fixtures/organisms.yml
|
254
|
-
- test/dummy/test/functional/organisms_controller_test.rb
|
255
253
|
- test/dummy/log/test.log
|
256
254
|
- test/dummy/log/development.log
|
257
255
|
- test/dummy/Rakefile
|
@@ -370,12 +368,6 @@ files:
|
|
370
368
|
- test/dummy/public/500.html
|
371
369
|
- test/dummy/db/schema.rb
|
372
370
|
- test/dummy/db/migrate/20130810074112_create_organisms.rb
|
373
|
-
- test/dummy/db/migrate/20130810081838_create_adherent_payments.adherent.rb
|
374
|
-
- test/dummy/db/migrate/20130810081835_create_adherent_members.adherent.rb
|
375
|
-
- test/dummy/db/migrate/20130810081837_create_adherent_adhesions.adherent.rb
|
376
|
-
- test/dummy/db/migrate/20130810081839_create_adherent_reglements.adherent.rb
|
377
|
-
- test/dummy/db/migrate/20130810081840_add_organism_id_to_adherent_members.adherent.rb
|
378
|
-
- test/dummy/db/migrate/20130810081836_create_adherent_coords.adherent.rb
|
379
371
|
- test/dummy/README.rdoc
|
380
372
|
- test/dummy/script/rails
|
381
373
|
- test/dummy/config/locales/fr.yml
|
@@ -415,8 +407,8 @@ files:
|
|
415
407
|
- test/test_helper.rb
|
416
408
|
- test/functional/adherent/reglements_controller_test.rb
|
417
409
|
- test/functional/adherent/coords_controller_test.rb
|
410
|
+
- test/functional/adherent/adhesions_controller_test.rb
|
418
411
|
- test/functional/adherent/members_controller_test.rb
|
419
|
-
- test/functional/adherent/adhesion_controller_test.rb
|
420
412
|
- test/functional/adherent/payments_controller_test.rb
|
421
413
|
homepage: http://faiteslescomptes.fr
|
422
414
|
licenses:
|
@@ -449,6 +441,7 @@ test_files:
|
|
449
441
|
- test/dummy/app/assets/stylesheets/scaffold.css
|
450
442
|
- test/dummy/app/assets/stylesheets/application.css
|
451
443
|
- test/dummy/app/models/organism.rb
|
444
|
+
- test/dummy/app/models/adherent/organism.rb
|
452
445
|
- test/dummy/app/views/layouts/adherent/_header.html.haml
|
453
446
|
- test/dummy/app/views/layouts/application.html.erb
|
454
447
|
- test/dummy/app/views/organisms/index.html.haml
|
@@ -460,10 +453,7 @@ test_files:
|
|
460
453
|
- test/dummy/app/controllers/application_controller.rb
|
461
454
|
- test/dummy/app/helpers/application_helper.rb
|
462
455
|
- test/dummy/app/helpers/organisms_helper.rb
|
463
|
-
- test/dummy/test/unit/organism_test.rb
|
464
|
-
- test/dummy/test/unit/helpers/organisms_helper_test.rb
|
465
456
|
- test/dummy/test/fixtures/organisms.yml
|
466
|
-
- test/dummy/test/functional/organisms_controller_test.rb
|
467
457
|
- test/dummy/log/test.log
|
468
458
|
- test/dummy/log/development.log
|
469
459
|
- test/dummy/Rakefile
|
@@ -582,12 +572,6 @@ test_files:
|
|
582
572
|
- test/dummy/public/500.html
|
583
573
|
- test/dummy/db/schema.rb
|
584
574
|
- test/dummy/db/migrate/20130810074112_create_organisms.rb
|
585
|
-
- test/dummy/db/migrate/20130810081838_create_adherent_payments.adherent.rb
|
586
|
-
- test/dummy/db/migrate/20130810081835_create_adherent_members.adherent.rb
|
587
|
-
- test/dummy/db/migrate/20130810081837_create_adherent_adhesions.adherent.rb
|
588
|
-
- test/dummy/db/migrate/20130810081839_create_adherent_reglements.adherent.rb
|
589
|
-
- test/dummy/db/migrate/20130810081840_add_organism_id_to_adherent_members.adherent.rb
|
590
|
-
- test/dummy/db/migrate/20130810081836_create_adherent_coords.adherent.rb
|
591
575
|
- test/dummy/README.rdoc
|
592
576
|
- test/dummy/script/rails
|
593
577
|
- test/dummy/config/locales/fr.yml
|
@@ -627,6 +611,6 @@ test_files:
|
|
627
611
|
- test/test_helper.rb
|
628
612
|
- test/functional/adherent/reglements_controller_test.rb
|
629
613
|
- test/functional/adherent/coords_controller_test.rb
|
614
|
+
- test/functional/adherent/adhesions_controller_test.rb
|
630
615
|
- test/functional/adherent/members_controller_test.rb
|
631
|
-
- test/functional/adherent/adhesion_controller_test.rb
|
632
616
|
- test/functional/adherent/payments_controller_test.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# This migration comes from adherent (originally 20130805145522)
|
2
|
-
class CreateAdherentMembers < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table :adherent_members do |t|
|
5
|
-
t.string :number
|
6
|
-
t.string :name
|
7
|
-
t.string :forname
|
8
|
-
t.date :birthdate
|
9
|
-
|
10
|
-
t.timestamps
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# This migration comes from adherent (originally 20130805152911)
|
2
|
-
class CreateAdherentCoords < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table :adherent_coords do |t|
|
5
|
-
t.string :mail
|
6
|
-
t.string :tel
|
7
|
-
t.string :gsm
|
8
|
-
t.string :office
|
9
|
-
t.text :address
|
10
|
-
t.string :zip
|
11
|
-
t.string :city
|
12
|
-
t.references :member
|
13
|
-
|
14
|
-
t.timestamps
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# This migration comes from adherent (originally 20130806053936)
|
2
|
-
class CreateAdherentAdhesions < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table :adherent_adhesions do |t|
|
5
|
-
t.date :from_date
|
6
|
-
t.date :to_date
|
7
|
-
t.decimal :amount, precision: 10, scale: 2
|
8
|
-
t.references :member
|
9
|
-
|
10
|
-
t.timestamps
|
11
|
-
end
|
12
|
-
|
13
|
-
add_index :adherent_adhesions, :member_id
|
14
|
-
end
|
15
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# This migration comes from adherent (originally 20130808054023)
|
2
|
-
class CreateAdherentPayments < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table :adherent_payments do |t|
|
5
|
-
t.date :date
|
6
|
-
t.decimal :amount, precision: 10, scale: 2
|
7
|
-
t.string :mode
|
8
|
-
|
9
|
-
t.references :member
|
10
|
-
|
11
|
-
t.timestamps
|
12
|
-
end
|
13
|
-
|
14
|
-
add_index :adherent_payments, :member_id
|
15
|
-
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# This migration comes from adherent (originally 20130809052125)
|
2
|
-
class CreateAdherentReglements < ActiveRecord::Migration
|
3
|
-
def change
|
4
|
-
create_table :adherent_reglements do |t|
|
5
|
-
t.decimal :amount, precision: 10, scale: 2
|
6
|
-
t.references :adhesion
|
7
|
-
t.references :payment
|
8
|
-
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
add_index :adherent_reglements, :adhesion_id
|
12
|
-
add_index :adherent_reglements, :payment_id
|
13
|
-
end
|
14
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class OrganismsControllerTest < ActionController::TestCase
|
4
|
-
setup do
|
5
|
-
@organism = organisms(:one)
|
6
|
-
end
|
7
|
-
|
8
|
-
test "should get index" do
|
9
|
-
get :index
|
10
|
-
assert_response :success
|
11
|
-
assert_not_nil assigns(:organisms)
|
12
|
-
end
|
13
|
-
|
14
|
-
test "should get new" do
|
15
|
-
get :new
|
16
|
-
assert_response :success
|
17
|
-
end
|
18
|
-
|
19
|
-
test "should create organism" do
|
20
|
-
assert_difference('Organism.count') do
|
21
|
-
post :create, organism: { status: @organism.status, title: @organism.title }
|
22
|
-
end
|
23
|
-
|
24
|
-
assert_redirected_to organism_path(assigns(:organism))
|
25
|
-
end
|
26
|
-
|
27
|
-
test "should show organism" do
|
28
|
-
get :show, id: @organism
|
29
|
-
assert_response :success
|
30
|
-
end
|
31
|
-
|
32
|
-
test "should get edit" do
|
33
|
-
get :edit, id: @organism
|
34
|
-
assert_response :success
|
35
|
-
end
|
36
|
-
|
37
|
-
test "should update organism" do
|
38
|
-
put :update, id: @organism, organism: { status: @organism.status, title: @organism.title }
|
39
|
-
assert_redirected_to organism_path(assigns(:organism))
|
40
|
-
end
|
41
|
-
|
42
|
-
test "should destroy organism" do
|
43
|
-
assert_difference('Organism.count', -1) do
|
44
|
-
delete :destroy, id: @organism
|
45
|
-
end
|
46
|
-
|
47
|
-
assert_redirected_to organisms_path
|
48
|
-
end
|
49
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Adherent
|
4
|
-
class AdhesionControllerTest < ActionController::TestCase
|
5
|
-
test "should get index" do
|
6
|
-
get :index
|
7
|
-
assert_response :success
|
8
|
-
end
|
9
|
-
|
10
|
-
test "should get edit" do
|
11
|
-
get :edit
|
12
|
-
assert_response :success
|
13
|
-
end
|
14
|
-
|
15
|
-
test "should get new" do
|
16
|
-
get :new
|
17
|
-
assert_response :success
|
18
|
-
end
|
19
|
-
|
20
|
-
test "should get show" do
|
21
|
-
get :show
|
22
|
-
assert_response :success
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
end
|