Skip to content

Commit 47e98a0

Browse files
committed
Complete coach application test
1 parent f6e40b1 commit 47e98a0

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

app/controllers/coach_applications_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def find_coach_application
5656

5757
def create_coach_application_params
5858
params.require(:coach_application).
59-
permit(:installationparty, :workshopday, :lightningtalk, :notes, :first_time_coaching)
59+
permit(:installationparty, :workshopday, :lightningtalk, :notes, :first_time_coaching, :coach_the_coaches, :sponsor)
6060
end
6161

6262
def check_application_status

test/factories.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
application_start { Time.now }
1818
application_end { Time.now }
1919
confirmation_date { Time.now }
20+
coach_the_coaches_date { Time.now }
21+
coach_the_coaches_start_time { Time.now }
22+
coach_the_coaches_end_time { Time.now }
2023
installation_get_together_date { Time.now }
24+
installation_get_together_start_time { Time.now }
25+
installation_get_together_end_time { Time.now }
2126
scheduled_at { Time.now }
2227
start_time { "10:00" }
2328
end_time { "18:00" }

test/system/add_coach_application_test.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ class AddCoachApplicationTest < ApplicationSystemTestCase
1717
end
1818

1919
test "Coach application" do
20-
check "installation party"
20+
check "installation get-together"
2121
check "workshop day"
22+
check "Yes, I'm coaching for the first time."
23+
check "Yes, I will attend the coach-the-coaches workshop."
2224

2325
fill_in "coach_application_lightningtalk", with: "Yes"
2426
fill_in "coach_application_notes", with: "I'm happy"
27+
fill_in "coach_application_sponsor", with: "Yes"
2528

2629
click_on "Submit"
2730

@@ -33,5 +36,8 @@ class AddCoachApplicationTest < ApplicationSystemTestCase
3336
assert_equal coach_application.workshopday, true
3437
assert_equal coach_application.lightningtalk, "Yes"
3538
assert_equal coach_application.notes, "I'm happy"
39+
assert_equal coach_application.first_time_coaching, true
40+
assert_equal coach_application.coach_the_coaches, true
41+
assert_equal coach_application.sponsor, "Yes"
3642
end
3743
end

0 commit comments

Comments
 (0)