Đang chuẩn bị liên kết để tải về tài liệu:
railsspace building a social networking website with ruby on rails phần 9

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

đăng nhập như @ người bạn và có được chấp nhận for@user.screen_name hành động. Kiểm tra sau đó xác minh tin nhắn nhấp nháy thích hợp và chuyển hướng cho mỗi hành động: Đăng nhập như là người dùng và gửi yêu cầu.tất cả các ý kiến một lần nữa. Một khả năng thứ hai | Simpo PDF Merge and Split Unregistered Version - http www.simpopdf.com 434 Chapter 14 Friendships Figure 14.7 A user profile with friend listing. log in as friend and get the accept action for @user.screen_name. The test then verifies the proper flash message and redirect for each action Listing 14.17 test functional friendship.controller.test.rb require File.dirname FILE__ . test_helper require friendship_controller Re-raise errors caught by the controller. class Friendshipcontroller def rescue_action e raise e end end class FriendshipControllerTest Test Unit TestCase include ProfileHelper fixtures users specs def setup controller FriendshipController.new request ActionController TestRequest.new response ActionController TestResponse.new user users valid_user friend users friend Make sure deliveries aren t actually made ActionMailer Base.delivery_method test end def test_create Log in as user and send request. Simpo PDF Merge and Split Unregistered Version - http www.simpopdf.com 14.3 Managing friendships 435 authorize @user get create id @friend.screen_name assert_response redirect assert_redirected_to profile_for @friend assert_equal Friend request sent. flash notice Log in as friend and accept request. authorize friend get accept id @user.screen_name assert_redirected_to hub_url assert_equal Friendship with @user.screen_name accepted flash notice end end Running this gives ruby test functional friendship_controller_test.rb Loaded suite test functional friendship_controller_test Started . Finished in 0.180971 seconds. 1 tests 5 assertions 0 failures 0 errors Simpo PDF Merge and Split Unregistered Version - http www.simpopdf.com This page intentionally left .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.