{"action":"created","comment":{"url":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/comments/62924158","id":62924158,"diff_hunk":"@@ -0,0 +1,103 @@\n+require 'rails_helper'\n+\n+RSpec.feature \"Visitor log in\" do\n+  scenario \"they can log in from the home index\" do\n+    user = create(:user)\n+\n+    visit root_path\n+\n+    within(\".main-resources\") do\n+        click_link \"LOGIN/REGISTER\"\n+    end\n+    expect(page).to have_current_path '/login'\n+\n+    expect(page).to have_content(\"Welcome!\")\n+    expect(page).to have_content(\"LOGIN\")\n+    expect(page).to have_content(\"REGISTER\")\n+\n+    fill_in \"Email\", with: user.email\n+    fill_in \"Password\", with: user.password\n+\n+    click_on \"LOGIN\"\n+\n+    expect(page).to have_current_path dashboard_path\n+\n+    expect(page).to have_content(\"Welcome #{user.first_name}\")\n+    expect(page).to have_content(\"Email: #{user.email}\")\n+  end\n+\n+  scenario \"Unregistered Vistor cannot log in\" do\n+    user = create(:user)\n+    visit root_path\n+\n+    within(\".main-resources\") do\n+        click_link \"LOGIN/REGISTER\"\n+    end\n+\n+    expect(page).to have_content(\"Welcome!\")\n+    expect(page).to have_content(\"LOGIN\")\n+    expect(page).to have_content(\"REGISTER\")\n+\n+    fill_in \"Email\", with: user.email\n+    fill_in \"Password\", with: \"Invalidpassword1234\"\n+\n+    click_on \"LOGIN\"\n+\n+    expect(page).to have_content(\"Invalid. Please try again.\")\n+\n+    expect(page).to have_current_path login_path\n+  end\n+\n+  scenario \"Vistor can Register with Valid credentials\" do\n+    user = create(:user)\n+    visit root_path\n+\n+    within(\".main-resources\") do\n+        click_link \"LOGIN/REGISTER\"\n+    end\n+\n+    click_link \"REGISTER\"\n+\n+    expect(page).to have_current_path new_user_path\n+\n+    expect(page).to have_content(\"Create Account\")\n+\n+    fill_in \"First Name\", with: user.first_name\n+    fill_in \"Last Name\", with: user.last_name\n+    fill_in \"Email\", with: \"#{user.email}+#{rand(999)}\"\n+    fill_in \"Password\", with: user.password\n+    fill_in \"Confirm Password\", with: user.password\n+\n+    click_on \"CREATE ACCOUNT\"\n+\n+    expect(page).to have_current_path dashboard_path\n+\n+    expect(page).to have_content(\"Welcome #{user.first_name}\")\n+    expect(page).to have_content(\"Email: #{user.email}\")\n+  end\n+\n+  scenario \"Vistor cannot Register with invalid credentials\" do\n+    user = create(:user)\n+    visit root_path\n+\n+    within(\".main-resources\") do\n+        click_link \"LOGIN/REGISTER\"\n+    end\n+\n+    click_link \"REGISTER\"\n+\n+    expect(page).to have_current_path new_user_path\n+\n+    expect(page).to have_content(\"Create Account\")\n+\n+    fill_in \"First Name\", with: user.first_name\n+    fill_in \"Last Name\", with: user.last_name\n+    fill_in \"Email\", with: \" \"\n+    fill_in \"Password\", with: user.password\n+    fill_in \"Confirm Password\", with: user.password\n+    # byebug","path":"spec/features/user_can_log_in_spec.rb","position":98,"original_position":98,"commit_id":"505e70f147ec70fbb845659228b651f5b55260b8","original_commit_id":"505e70f147ec70fbb845659228b651f5b55260b8","user":{"login":"Claudia108","id":15485124,"avatar_url":"https://avatars.githubusercontent.com/u/15485124?v=3","gravatar_id":"","url":"https://api.github.com/users/Claudia108","html_url":"https://github.com/Claudia108","followers_url":"https://api.github.com/users/Claudia108/followers","following_url":"https://api.github.com/users/Claudia108/following{/other_user}","gists_url":"https://api.github.com/users/Claudia108/gists{/gist_id}","starred_url":"https://api.github.com/users/Claudia108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Claudia108/subscriptions","organizations_url":"https://api.github.com/users/Claudia108/orgs","repos_url":"https://api.github.com/users/Claudia108/repos","events_url":"https://api.github.com/users/Claudia108/events{/privacy}","received_events_url":"https://api.github.com/users/Claudia108/received_events","type":"User","site_admin":false},"body":"Need to delete byebug comment.","created_at":"2016-05-11T20:50:26Z","updated_at":"2016-05-11T20:50:26Z","html_url":"https://github.com/alirezaandersen/the_pivot/pull/31#discussion_r62924158","pull_request_url":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/comments/62924158"},"html":{"href":"https://github.com/alirezaandersen/the_pivot/pull/31#discussion_r62924158"},"pull_request":{"href":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/31","id":69736351,"html_url":"https://github.com/alirezaandersen/the_pivot/pull/31","diff_url":"https://github.com/alirezaandersen/the_pivot/pull/31.diff","patch_url":"https://github.com/alirezaandersen/the_pivot/pull/31.patch","issue_url":"https://api.github.com/repos/alirezaandersen/the_pivot/issues/31","number":31,"state":"open","locked":false,"title":"Job seeker functionality","user":{"login":"alirezaandersen","id":14337195,"avatar_url":"https://avatars.githubusercontent.com/u/14337195?v=3","gravatar_id":"","url":"https://api.github.com/users/alirezaandersen","html_url":"https://github.com/alirezaandersen","followers_url":"https://api.github.com/users/alirezaandersen/followers","following_url":"https://api.github.com/users/alirezaandersen/following{/other_user}","gists_url":"https://api.github.com/users/alirezaandersen/gists{/gist_id}","starred_url":"https://api.github.com/users/alirezaandersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alirezaandersen/subscriptions","organizations_url":"https://api.github.com/users/alirezaandersen/orgs","repos_url":"https://api.github.com/users/alirezaandersen/repos","events_url":"https://api.github.com/users/alirezaandersen/events{/privacy}","received_events_url":"https://api.github.com/users/alirezaandersen/received_events","type":"User","site_admin":false},"body":"* Create guest and registered login options for users. \r\n   Create user and sessions controllers, model, and views. \r\n   Implement new routes for these options \r\n   Create factory girl options for testing purpose \r\n* Test both happy and sad paths all test pass. ","created_at":"2016-05-11T20:25:07Z","updated_at":"2016-05-11T20:50:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d934f502b728d5d3c40db650691002ac6830931","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/31/commits","review_comments_url":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/31/comments","review_comment_url":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alirezaandersen/the_pivot/issues/31/comments","statuses_url":"https://api.github.com/repos/alirezaandersen/the_pivot/statuses/505e70f147ec70fbb845659228b651f5b55260b8","head":{"label":"alirezaandersen:job_seeker_functionality","ref":"job_seeker_functionality","sha":"505e70f147ec70fbb845659228b651f5b55260b8","user":{"login":"alirezaandersen","id":14337195,"avatar_url":"https://avatars.githubusercontent.com/u/14337195?v=3","gravatar_id":"","url":"https://api.github.com/users/alirezaandersen","html_url":"https://github.com/alirezaandersen","followers_url":"https://api.github.com/users/alirezaandersen/followers","following_url":"https://api.github.com/users/alirezaandersen/following{/other_user}","gists_url":"https://api.github.com/users/alirezaandersen/gists{/gist_id}","starred_url":"https://api.github.com/users/alirezaandersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alirezaandersen/subscriptions","organizations_url":"https://api.github.com/users/alirezaandersen/orgs","repos_url":"https://api.github.com/users/alirezaandersen/repos","events_url":"https://api.github.com/users/alirezaandersen/events{/privacy}","received_events_url":"https://api.github.com/users/alirezaandersen/received_events","type":"User","site_admin":false},"repo":{"id":58403709,"name":"the_pivot","full_name":"alirezaandersen/the_pivot","owner":{"login":"alirezaandersen","id":14337195,"avatar_url":"https://avatars.githubusercontent.com/u/14337195?v=3","gravatar_id":"","url":"https://api.github.com/users/alirezaandersen","html_url":"https://github.com/alirezaandersen","followers_url":"https://api.github.com/users/alirezaandersen/followers","following_url":"https://api.github.com/users/alirezaandersen/following{/other_user}","gists_url":"https://api.github.com/users/alirezaandersen/gists{/gist_id}","starred_url":"https://api.github.com/users/alirezaandersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alirezaandersen/subscriptions","organizations_url":"https://api.github.com/users/alirezaandersen/orgs","repos_url":"https://api.github.com/users/alirezaandersen/repos","events_url":"https://api.github.com/users/alirezaandersen/events{/privacy}","received_events_url":"https://api.github.com/users/alirezaandersen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alirezaandersen/the_pivot","description":"","fork":false,"url":"https://api.github.com/repos/alirezaandersen/the_pivot","forks_url":"https://api.github.com/repos/alirezaandersen/the_pivot/forks","keys_url":"https://api.github.com/repos/alirezaandersen/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alirezaandersen/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alirezaandersen/the_pivot/teams","hooks_url":"https://api.github.com/repos/alirezaandersen/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/alirezaandersen/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/alirezaandersen/the_pivot/events","assignees_url":"https://api.github.com/repos/alirezaandersen/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/alirezaandersen/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/alirezaandersen/the_pivot/tags","blobs_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alirezaandersen/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/alirezaandersen/the_pivot/languages","stargazers_url":"https://api.github.com/repos/alirezaandersen/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/alirezaandersen/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/alirezaandersen/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/alirezaandersen/the_pivot/subscription","commits_url":"https://api.github.com/repos/alirezaandersen/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/alirezaandersen/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/alirezaandersen/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/alirezaandersen/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/alirezaandersen/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alirezaandersen/the_pivot/merges","archive_url":"https://api.github.com/repos/alirezaandersen/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alirezaandersen/the_pivot/downloads","issues_url":"https://api.github.com/repos/alirezaandersen/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/alirezaandersen/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/alirezaandersen/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alirezaandersen/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/alirezaandersen/the_pivot/releases{/id}","deployments_url":"https://api.github.com/repos/alirezaandersen/the_pivot/deployments","created_at":"2016-05-09T19:52:12Z","updated_at":"2016-05-09T19:53:25Z","pushed_at":"2016-05-11T20:25:08Z","git_url":"git://github.com/alirezaandersen/the_pivot.git","ssh_url":"git@github.com:alirezaandersen/the_pivot.git","clone_url":"https://github.com/alirezaandersen/the_pivot.git","svn_url":"https://github.com/alirezaandersen/the_pivot","homepage":null,"size":14630,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":23,"forks":0,"open_issues":23,"watchers":0,"default_branch":"master"}},"base":{"label":"alirezaandersen:16_home-index","ref":"16_home-index","sha":"482e1275334cfd975507dc571f6b68809bd9e911","user":{"login":"alirezaandersen","id":14337195,"avatar_url":"https://avatars.githubusercontent.com/u/14337195?v=3","gravatar_id":"","url":"https://api.github.com/users/alirezaandersen","html_url":"https://github.com/alirezaandersen","followers_url":"https://api.github.com/users/alirezaandersen/followers","following_url":"https://api.github.com/users/alirezaandersen/following{/other_user}","gists_url":"https://api.github.com/users/alirezaandersen/gists{/gist_id}","starred_url":"https://api.github.com/users/alirezaandersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alirezaandersen/subscriptions","organizations_url":"https://api.github.com/users/alirezaandersen/orgs","repos_url":"https://api.github.com/users/alirezaandersen/repos","events_url":"https://api.github.com/users/alirezaandersen/events{/privacy}","received_events_url":"https://api.github.com/users/alirezaandersen/received_events","type":"User","site_admin":false},"repo":{"id":58403709,"name":"the_pivot","full_name":"alirezaandersen/the_pivot","owner":{"login":"alirezaandersen","id":14337195,"avatar_url":"https://avatars.githubusercontent.com/u/14337195?v=3","gravatar_id":"","url":"https://api.github.com/users/alirezaandersen","html_url":"https://github.com/alirezaandersen","followers_url":"https://api.github.com/users/alirezaandersen/followers","following_url":"https://api.github.com/users/alirezaandersen/following{/other_user}","gists_url":"https://api.github.com/users/alirezaandersen/gists{/gist_id}","starred_url":"https://api.github.com/users/alirezaandersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alirezaandersen/subscriptions","organizations_url":"https://api.github.com/users/alirezaandersen/orgs","repos_url":"https://api.github.com/users/alirezaandersen/repos","events_url":"https://api.github.com/users/alirezaandersen/events{/privacy}","received_events_url":"https://api.github.com/users/alirezaandersen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alirezaandersen/the_pivot","description":"","fork":false,"url":"https://api.github.com/repos/alirezaandersen/the_pivot","forks_url":"https://api.github.com/repos/alirezaandersen/the_pivot/forks","keys_url":"https://api.github.com/repos/alirezaandersen/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alirezaandersen/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alirezaandersen/the_pivot/teams","hooks_url":"https://api.github.com/repos/alirezaandersen/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/alirezaandersen/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/alirezaandersen/the_pivot/events","assignees_url":"https://api.github.com/repos/alirezaandersen/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/alirezaandersen/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/alirezaandersen/the_pivot/tags","blobs_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alirezaandersen/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/alirezaandersen/the_pivot/languages","stargazers_url":"https://api.github.com/repos/alirezaandersen/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/alirezaandersen/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/alirezaandersen/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/alirezaandersen/the_pivot/subscription","commits_url":"https://api.github.com/repos/alirezaandersen/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/alirezaandersen/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/alirezaandersen/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/alirezaandersen/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/alirezaandersen/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/alirezaandersen/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alirezaandersen/the_pivot/merges","archive_url":"https://api.github.com/repos/alirezaandersen/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alirezaandersen/the_pivot/downloads","issues_url":"https://api.github.com/repos/alirezaandersen/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/alirezaandersen/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/alirezaandersen/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alirezaandersen/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/alirezaandersen/the_pivot/releases{/id}","deployments_url":"https://api.github.com/repos/alirezaandersen/the_pivot/deployments","created_at":"2016-05-09T19:52:12Z","updated_at":"2016-05-09T19:53:25Z","pushed_at":"2016-05-11T20:25:08Z","git_url":"git://github.com/alirezaandersen/the_pivot.git","ssh_url":"git@github.com:alirezaandersen/the_pivot.git","clone_url":"https://github.com/alirezaandersen/the_pivot.git","svn_url":"https://github.com/alirezaandersen/the_pivot","homepage":null,"size":14630,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":23,"forks":0,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/31"},"html":{"href":"https://github.com/alirezaandersen/the_pivot/pull/31"},"issue":{"href":"https://api.github.com/repos/alirezaandersen/the_pivot/issues/31"},"comments":{"href":"https://api.github.com/repos/alirezaandersen/the_pivot/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alirezaandersen/the_pivot/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/alirezaandersen/the_pivot/statuses/505e70f147ec70fbb845659228b651f5b55260b8"}}}}