{"action":"created","comment":{"url":"https://api.github.com/repos/trishzag/kid_coders/pulls/comments/41717347","id":41717347,"diff_hunk":"@@ -1,10 +1,92 @@\n-# As a User\n-# I want to view detailed information for each assignment\n-# So that I have access to all of the materials while I complete the assignment\n-#\n-# Acceptance Criteria\n-# [ ] I must be signed and registered for the curriculum to view detailed\n-# information about each assignment\n-# [ ] I must see all content for the assignment on the assignment detail page\n-# [ ] I must see a link to the assignment detail from my user account page and\n-# from the assignment index page\n+require 'rails_helper'\n+\n+feature 'user views assignment detail', %{As a User\n+  I want to view detailed information for each assignment\n+  So that I have access to all of the materials while I complete the assignment\n+\n+  Acceptance Criteria\n+  [X] I must be signed in to view detailed information about each assignment\n+  [X] I must see all content for the assignment on the assignment detail page\n+  [X] I must see a link to the assignment detail from the curriculum show page\n+  [X] I must see a link to the assignment detail from my user account page if I\n+  have the curriculum on my userplan\n+} do\n+  let!(:user) { FactoryGirl.create(:user) }\n+  let!(:curriculum) { FactoryGirl.create(:curriculum_with_assignments) }\n+\n+  scenario 'visitor cannot access the assignment detail' do\n+    assignments = curriculum.assignments\n+    visit root_path\n+    click_link(\"View Curricula\")\n+    find(\"a[href='#{curriculum_path(curriculum)}']\").click\n+\n+    expect(page).to have_content(\"You need to sign in or sign up before\")\n+    expect(page).to have_content(\"Log in\")\n+    assignments.each do |assignment|\n+      expect(page).to_not have_content(assignment.title)\n+    end\n+  end\n+\n+  scenario 'signed in user can view the assignment detail' do\n+    assignments = curriculum.assignments\n+    assignment = assignments.first\n+    other_assignment = assignments.last\n+    login_with_username(user)\n+    click_link(\"View Curricula\")\n+    find(\"a[href='#{curriculum_path(curriculum)}']\").click\n+    find(\"a[href='#{assignment_path(assignment)}']\").click\n+\n+    expect(page).to have_content(assignment.title)\n+    contents = assignment.contents\n+      contents.each do |content|\n+        expect(page).to have_content(content.title)\n+        expect(page).to have_content(content.description)\n+        expect(page).to have_content(content.source)\n+      end\n+\n+    resources = assignment.resources\n+      resources.each do |resource|\n+        expect(page).to have_content(resource.name)\n+        expect(page).to have_content(resource.source)\n+      end\n+\n+    expect(page).to_not have_content(other_assignment.title)\n+    contents = other_assignment.contents\n+      contents.each do |content|\n+        expect(page).to_not have_content(content.title)\n+        expect(page).to_not have_content(content.description)\n+        expect(page).to_not have_content(content.source)\n+      end\n+\n+    resources = other_assignment.resources\n+      resources.each do |resource|\n+        expect(page).to_not have_content(resource.name)\n+        expect(page).to_not have_content(resource.source)\n+      end\n+  end\n+\n+  scenario 'user can access the assignment detail from user detail page' do\n+    FactoryGirl.create(:userplan, user: user, curriculum: curriculum)\n+    assignments = curriculum.assignments\n+    assignment = assignments.first\n+    login_with_username(user)\n+    visit user_path(user)\n+\n+    expect(page).to have_content(assignment.title)\n+    find(\"a[href='#{assignment_path(assignment)}']\").click\n+\n+    expect(page).to have_content(assignment.title)\n+    contents = assignment.contents\n+      contents.each do |content|","path":"spec/features/assignments/user_views_assignment_details_spec.rb","position":90,"original_position":90,"commit_id":"44694aca215ef78c77b457c91bcad8a0941955d5","original_commit_id":"44694aca215ef78c77b457c91bcad8a0941955d5","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Inconsistent indentation detected.","created_at":"2015-10-11T23:36:09Z","updated_at":"2015-10-11T23:36:09Z","html_url":"https://github.com/trishzag/kid_coders/pull/33#discussion_r41717347","pull_request_url":"https://api.github.com/repos/trishzag/kid_coders/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/trishzag/kid_coders/pulls/comments/41717347"},"html":{"href":"https://github.com/trishzag/kid_coders/pull/33#discussion_r41717347"},"pull_request":{"href":"https://api.github.com/repos/trishzag/kid_coders/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/trishzag/kid_coders/pulls/33","id":47378166,"html_url":"https://github.com/trishzag/kid_coders/pull/33","diff_url":"https://github.com/trishzag/kid_coders/pull/33.diff","patch_url":"https://github.com/trishzag/kid_coders/pull/33.patch","issue_url":"https://api.github.com/repos/trishzag/kid_coders/issues/33","number":33,"state":"open","locked":false,"title":"added assignment detail page","user":{"login":"trishzag","id":13068178,"avatar_url":"https://avatars.githubusercontent.com/u/13068178?v=3","gravatar_id":"","url":"https://api.github.com/users/trishzag","html_url":"https://github.com/trishzag","followers_url":"https://api.github.com/users/trishzag/followers","following_url":"https://api.github.com/users/trishzag/following{/other_user}","gists_url":"https://api.github.com/users/trishzag/gists{/gist_id}","starred_url":"https://api.github.com/users/trishzag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trishzag/subscriptions","organizations_url":"https://api.github.com/users/trishzag/orgs","repos_url":"https://api.github.com/users/trishzag/repos","events_url":"https://api.github.com/users/trishzag/events{/privacy}","received_events_url":"https://api.github.com/users/trishzag/received_events","type":"User","site_admin":false},"body":"added assignment detail\r\nmodified user show detail to add link to assignment detail\r\nmodified curriculum model to restrict name length\r\nmodified assignment model to restrict title length\r\nadded styling to various pages\r\nmodified assignments controller","created_at":"2015-10-11T23:28:57Z","updated_at":"2015-10-11T23:36:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44074662951f050b153b07bae994690d68204008","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/trishzag/kid_coders/pulls/33/commits","review_comments_url":"https://api.github.com/repos/trishzag/kid_coders/pulls/33/comments","review_comment_url":"https://api.github.com/repos/trishzag/kid_coders/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trishzag/kid_coders/issues/33/comments","statuses_url":"https://api.github.com/repos/trishzag/kid_coders/statuses/44694aca215ef78c77b457c91bcad8a0941955d5","head":{"label":"trishzag:add-assignment-detail","ref":"add-assignment-detail","sha":"44694aca215ef78c77b457c91bcad8a0941955d5","user":{"login":"trishzag","id":13068178,"avatar_url":"https://avatars.githubusercontent.com/u/13068178?v=3","gravatar_id":"","url":"https://api.github.com/users/trishzag","html_url":"https://github.com/trishzag","followers_url":"https://api.github.com/users/trishzag/followers","following_url":"https://api.github.com/users/trishzag/following{/other_user}","gists_url":"https://api.github.com/users/trishzag/gists{/gist_id}","starred_url":"https://api.github.com/users/trishzag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trishzag/subscriptions","organizations_url":"https://api.github.com/users/trishzag/orgs","repos_url":"https://api.github.com/users/trishzag/repos","events_url":"https://api.github.com/users/trishzag/events{/privacy}","received_events_url":"https://api.github.com/users/trishzag/received_events","type":"User","site_admin":false},"repo":{"id":43615780,"name":"kid_coders","full_name":"trishzag/kid_coders","owner":{"login":"trishzag","id":13068178,"avatar_url":"https://avatars.githubusercontent.com/u/13068178?v=3","gravatar_id":"","url":"https://api.github.com/users/trishzag","html_url":"https://github.com/trishzag","followers_url":"https://api.github.com/users/trishzag/followers","following_url":"https://api.github.com/users/trishzag/following{/other_user}","gists_url":"https://api.github.com/users/trishzag/gists{/gist_id}","starred_url":"https://api.github.com/users/trishzag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trishzag/subscriptions","organizations_url":"https://api.github.com/users/trishzag/orgs","repos_url":"https://api.github.com/users/trishzag/repos","events_url":"https://api.github.com/users/trishzag/events{/privacy}","received_events_url":"https://api.github.com/users/trishzag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trishzag/kid_coders","description":"Final project for Launch Academy - interactive website to teach coding skils to children.","fork":false,"url":"https://api.github.com/repos/trishzag/kid_coders","forks_url":"https://api.github.com/repos/trishzag/kid_coders/forks","keys_url":"https://api.github.com/repos/trishzag/kid_coders/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trishzag/kid_coders/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trishzag/kid_coders/teams","hooks_url":"https://api.github.com/repos/trishzag/kid_coders/hooks","issue_events_url":"https://api.github.com/repos/trishzag/kid_coders/issues/events{/number}","events_url":"https://api.github.com/repos/trishzag/kid_coders/events","assignees_url":"https://api.github.com/repos/trishzag/kid_coders/assignees{/user}","branches_url":"https://api.github.com/repos/trishzag/kid_coders/branches{/branch}","tags_url":"https://api.github.com/repos/trishzag/kid_coders/tags","blobs_url":"https://api.github.com/repos/trishzag/kid_coders/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trishzag/kid_coders/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trishzag/kid_coders/git/refs{/sha}","trees_url":"https://api.github.com/repos/trishzag/kid_coders/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trishzag/kid_coders/statuses/{sha}","languages_url":"https://api.github.com/repos/trishzag/kid_coders/languages","stargazers_url":"https://api.github.com/repos/trishzag/kid_coders/stargazers","contributors_url":"https://api.github.com/repos/trishzag/kid_coders/contributors","subscribers_url":"https://api.github.com/repos/trishzag/kid_coders/subscribers","subscription_url":"https://api.github.com/repos/trishzag/kid_coders/subscription","commits_url":"https://api.github.com/repos/trishzag/kid_coders/commits{/sha}","git_commits_url":"https://api.github.com/repos/trishzag/kid_coders/git/commits{/sha}","comments_url":"https://api.github.com/repos/trishzag/kid_coders/comments{/number}","issue_comment_url":"https://api.github.com/repos/trishzag/kid_coders/issues/comments{/number}","contents_url":"https://api.github.com/repos/trishzag/kid_coders/contents/{+path}","compare_url":"https://api.github.com/repos/trishzag/kid_coders/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trishzag/kid_coders/merges","archive_url":"https://api.github.com/repos/trishzag/kid_coders/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trishzag/kid_coders/downloads","issues_url":"https://api.github.com/repos/trishzag/kid_coders/issues{/number}","pulls_url":"https://api.github.com/repos/trishzag/kid_coders/pulls{/number}","milestones_url":"https://api.github.com/repos/trishzag/kid_coders/milestones{/number}","notifications_url":"https://api.github.com/repos/trishzag/kid_coders/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trishzag/kid_coders/labels{/name}","releases_url":"https://api.github.com/repos/trishzag/kid_coders/releases{/id}","created_at":"2015-10-03T21:33:53Z","updated_at":"2015-10-07T03:54:49Z","pushed_at":"2015-10-11T23:36:05Z","git_url":"git://github.com/trishzag/kid_coders.git","ssh_url":"git@github.com:trishzag/kid_coders.git","clone_url":"https://github.com/trishzag/kid_coders.git","svn_url":"https://github.com/trishzag/kid_coders","homepage":null,"size":1464,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"trishzag:master","ref":"master","sha":"365c0b0972e3c03ea288917487de0d34d63ddacf","user":{"login":"trishzag","id":13068178,"avatar_url":"https://avatars.githubusercontent.com/u/13068178?v=3","gravatar_id":"","url":"https://api.github.com/users/trishzag","html_url":"https://github.com/trishzag","followers_url":"https://api.github.com/users/trishzag/followers","following_url":"https://api.github.com/users/trishzag/following{/other_user}","gists_url":"https://api.github.com/users/trishzag/gists{/gist_id}","starred_url":"https://api.github.com/users/trishzag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trishzag/subscriptions","organizations_url":"https://api.github.com/users/trishzag/orgs","repos_url":"https://api.github.com/users/trishzag/repos","events_url":"https://api.github.com/users/trishzag/events{/privacy}","received_events_url":"https://api.github.com/users/trishzag/received_events","type":"User","site_admin":false},"repo":{"id":43615780,"name":"kid_coders","full_name":"trishzag/kid_coders","owner":{"login":"trishzag","id":13068178,"avatar_url":"https://avatars.githubusercontent.com/u/13068178?v=3","gravatar_id":"","url":"https://api.github.com/users/trishzag","html_url":"https://github.com/trishzag","followers_url":"https://api.github.com/users/trishzag/followers","following_url":"https://api.github.com/users/trishzag/following{/other_user}","gists_url":"https://api.github.com/users/trishzag/gists{/gist_id}","starred_url":"https://api.github.com/users/trishzag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trishzag/subscriptions","organizations_url":"https://api.github.com/users/trishzag/orgs","repos_url":"https://api.github.com/users/trishzag/repos","events_url":"https://api.github.com/users/trishzag/events{/privacy}","received_events_url":"https://api.github.com/users/trishzag/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trishzag/kid_coders","description":"Final project for Launch Academy - interactive website to teach coding skils to children.","fork":false,"url":"https://api.github.com/repos/trishzag/kid_coders","forks_url":"https://api.github.com/repos/trishzag/kid_coders/forks","keys_url":"https://api.github.com/repos/trishzag/kid_coders/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trishzag/kid_coders/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trishzag/kid_coders/teams","hooks_url":"https://api.github.com/repos/trishzag/kid_coders/hooks","issue_events_url":"https://api.github.com/repos/trishzag/kid_coders/issues/events{/number}","events_url":"https://api.github.com/repos/trishzag/kid_coders/events","assignees_url":"https://api.github.com/repos/trishzag/kid_coders/assignees{/user}","branches_url":"https://api.github.com/repos/trishzag/kid_coders/branches{/branch}","tags_url":"https://api.github.com/repos/trishzag/kid_coders/tags","blobs_url":"https://api.github.com/repos/trishzag/kid_coders/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trishzag/kid_coders/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trishzag/kid_coders/git/refs{/sha}","trees_url":"https://api.github.com/repos/trishzag/kid_coders/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trishzag/kid_coders/statuses/{sha}","languages_url":"https://api.github.com/repos/trishzag/kid_coders/languages","stargazers_url":"https://api.github.com/repos/trishzag/kid_coders/stargazers","contributors_url":"https://api.github.com/repos/trishzag/kid_coders/contributors","subscribers_url":"https://api.github.com/repos/trishzag/kid_coders/subscribers","subscription_url":"https://api.github.com/repos/trishzag/kid_coders/subscription","commits_url":"https://api.github.com/repos/trishzag/kid_coders/commits{/sha}","git_commits_url":"https://api.github.com/repos/trishzag/kid_coders/git/commits{/sha}","comments_url":"https://api.github.com/repos/trishzag/kid_coders/comments{/number}","issue_comment_url":"https://api.github.com/repos/trishzag/kid_coders/issues/comments{/number}","contents_url":"https://api.github.com/repos/trishzag/kid_coders/contents/{+path}","compare_url":"https://api.github.com/repos/trishzag/kid_coders/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trishzag/kid_coders/merges","archive_url":"https://api.github.com/repos/trishzag/kid_coders/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trishzag/kid_coders/downloads","issues_url":"https://api.github.com/repos/trishzag/kid_coders/issues{/number}","pulls_url":"https://api.github.com/repos/trishzag/kid_coders/pulls{/number}","milestones_url":"https://api.github.com/repos/trishzag/kid_coders/milestones{/number}","notifications_url":"https://api.github.com/repos/trishzag/kid_coders/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trishzag/kid_coders/labels{/name}","releases_url":"https://api.github.com/repos/trishzag/kid_coders/releases{/id}","created_at":"2015-10-03T21:33:53Z","updated_at":"2015-10-07T03:54:49Z","pushed_at":"2015-10-11T23:36:05Z","git_url":"git://github.com/trishzag/kid_coders.git","ssh_url":"git@github.com:trishzag/kid_coders.git","clone_url":"https://github.com/trishzag/kid_coders.git","svn_url":"https://github.com/trishzag/kid_coders","homepage":null,"size":1464,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trishzag/kid_coders/pulls/33"},"html":{"href":"https://github.com/trishzag/kid_coders/pull/33"},"issue":{"href":"https://api.github.com/repos/trishzag/kid_coders/issues/33"},"comments":{"href":"https://api.github.com/repos/trishzag/kid_coders/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/trishzag/kid_coders/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/trishzag/kid_coders/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trishzag/kid_coders/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/trishzag/kid_coders/statuses/44694aca215ef78c77b457c91bcad8a0941955d5"}}}}