From 280a5f201bae192ef66eb7216bf00b2e8a47d600 Mon Sep 17 00:00:00 2001 From: charlieperson Date: Tue, 26 Apr 2016 18:49:37 +0100 Subject: [PATCH] Adds failing student profile model test that checks if the student profile responds to skype username --- app/views/dashboard/index.html.erb | 1 + app/views/teacher_profiles/show.html.haml | 1 + spec/models/student_profile_model_spec.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 0c8f0cd..a0cf0a0 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -7,6 +7,7 @@

Current teacher: +
<% @student.current_teachers.each do |relationship| %> Name: <%= @teachers.find(relationship.teacher_id).teacher_profile.name %> diff --git a/app/views/teacher_profiles/show.html.haml b/app/views/teacher_profiles/show.html.haml index 9b0abd6..d69d678 100644 --- a/app/views/teacher_profiles/show.html.haml +++ b/app/views/teacher_profiles/show.html.haml @@ -11,6 +11,7 @@ Bio: = @teacher.teacher_profile.bio %br + Skype username: = @teacher.teacher_profile.skype_username %br = link_to 'Edit profile', edit_teacher_profile_path(@teacher.teacher_profile.id) diff --git a/spec/models/student_profile_model_spec.rb b/spec/models/student_profile_model_spec.rb index 9bb054b..9012b5c 100644 --- a/spec/models/student_profile_model_spec.rb +++ b/spec/models/student_profile_model_spec.rb @@ -10,6 +10,7 @@ it { is_expected.to respond_to(:name) } it { is_expected.to respond_to(:native_language) } it { is_expected.to respond_to(:learning_objectives) } + it { is_expected.to respond_to(:skype_username)} end context 'Student profile validations' do it { should validate_presence_of(:name) }