Sha256: a8fb2801705a39c9c58ab8cd27f81194be301f89fd99a5c1f216549349b92f61
Contents?: true
Size: 959 Bytes
Versions: 27
Compression:
Stored size: 959 Bytes
Contents
require 'test_helper' class EditProfileTest < ActionController::IntegrationTest context 'Editing a user profile' do setup do @user = Factory(:user, :password => 'password') sign_in_as(@user.email, 'password') visit edit_user_path(@user) end should_respond_with :success should "see the form with his info" do assert_select "input#user_first_name[value='#{@user.first_name}']" assert_select "input#user_last_name[value='#{@user.last_name}']" assert_select "input#user_email[value='#{@user.email}']" end should "update valid information and see the SHOW page" do fill_in "user_first_name", :with => 'OtherName' click_button 'Save' assert_contain /othername/i end should "update invalid information and see errors" do fill_in "user_first_name", :with => '' click_button 'Save' assert_contain /First name .* blank/i end end end
Version data entries
27 entries across 26 versions & 4 rubygems