diff --git a/ruby/lib/jam_ruby/models/user.rb b/ruby/lib/jam_ruby/models/user.rb index bfd92fdae..3e187b491 100644 --- a/ruby/lib/jam_ruby/models/user.rb +++ b/ruby/lib/jam_ruby/models/user.rb @@ -1128,7 +1128,14 @@ module JamRuby school_name = school ? school.name : 'a music school' user.teacher = Teacher.build_teacher(user, validate_introduction: true, biography: "Teaches for #{school_name}", school_id: school_id) end + else + if user.is_a_teacher + user.teacher = Teacher.build_teacher(user, validate_introduction: true, biography: "Empty biography") + end + end + + # FIXME: Setting random password for social network logins. This # is because we have validations all over the place on this. # The right thing would be to have this null diff --git a/web/spec/features/teacher_landing_spec.rb b/web/spec/features/teacher_landing_spec.rb index 85a4853e7..25bba00eb 100644 --- a/web/spec/features/teacher_landing_spec.rb +++ b/web/spec/features/teacher_landing_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "Student Landing", :js => true, :type => :feature, :capybara_feature => true do +describe "Teacher Landing", :js => true, :type => :feature, :capybara_feature => true do subject { page }