{"action":"created","comment":{"url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/comments/38867130","id":38867130,"diff_hunk":"@@ -0,0 +1,58 @@\n+require 'rails_helper'\n+\n+describe 'Management decks' do\n+  \n+  context \"registered user\" do\n+\n+    let!(:user) { create(:user) }\n+    before(:each) do\n+      login(user.email, \"pass\")\n+    end\n+    \n+    it \"can add deck\" do\n+      visit new_deck_path\n+      fill_in \"deck_name\", with: \"English\"\n+      click_button \"Create Deck\"\n+      expect(page).to have_content \"Успешно добавлена колода\"\n+    end\n+\n+    it \"can view his decks\" do\n+      create(:deck, user: user)\n+      visit decks_path\n+\n+      expect(page).to have_content \"English\"\n+    end\n+\n+    it \"can't view another user's decks\" do\n+      user2 = create(:user)\n+      create(:deck, name: \"French\", user: user2)\n+\n+      visit decks_path\n+      expect(page).to_not have_content \"French\"\n+    end\n+\n+    it \"highlight current deck\" do\n+      create(:deck, user: user, current: true)\n+      visit decks_path\n+\n+      expect(page).to have_css('tr.success')\n+      within(\".success\") do\n+        expect(page).to have_content \"English\"\n+      end\n+    end\n+  end\n+\n+  context \"guest\" do\n+    it \"can't add card\" do\n+      visit new_deck_path\n+      expect(page).to have_content \"Please login first\"\n+    end\n+\n+    it \"can't view cards\" do\n+      visit decks_path\n+      expect(page).to have_content \"Please login first\"\n+    end\n+\n+  end\n+","path":"spec/features/deck_management_spec.rb","position":57,"original_position":57,"commit_id":"e76b50de8434faed71eb7e73be49ff85b9ed79e5","original_commit_id":"e76b50de8434faed71eb7e73be49ff85b9ed79e5","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":"Extra empty line detected at block body end.","created_at":"2015-09-07T14:49:26Z","updated_at":"2015-09-07T14:49:26Z","html_url":"https://github.com/yuri-polessky/flashcards/pull/12#discussion_r38867130","pull_request_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/comments/38867130"},"html":{"href":"https://github.com/yuri-polessky/flashcards/pull/12#discussion_r38867130"},"pull_request":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/12","id":44362244,"html_url":"https://github.com/yuri-polessky/flashcards/pull/12","diff_url":"https://github.com/yuri-polessky/flashcards/pull/12.diff","patch_url":"https://github.com/yuri-polessky/flashcards/pull/12.patch","issue_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/12","number":12,"state":"open","locked":false,"title":"Implelemt decks","user":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-07T14:49:18Z","updated_at":"2015-09-07T14:49:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2d8f22a91c51384710ca6989aafba438f632ff7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/12/commits","review_comments_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/12/comments","review_comment_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/12/comments","statuses_url":"https://api.github.com/repos/yuri-polessky/flashcards/statuses/e76b50de8434faed71eb7e73be49ff85b9ed79e5","head":{"label":"yuri-polessky:eleventh-task","ref":"eleventh-task","sha":"e76b50de8434faed71eb7e73be49ff85b9ed79e5","user":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"repo":{"id":41664877,"name":"flashcards","full_name":"yuri-polessky/flashcards","owner":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuri-polessky/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/yuri-polessky/flashcards","forks_url":"https://api.github.com/repos/yuri-polessky/flashcards/forks","keys_url":"https://api.github.com/repos/yuri-polessky/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuri-polessky/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuri-polessky/flashcards/teams","hooks_url":"https://api.github.com/repos/yuri-polessky/flashcards/hooks","issue_events_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/yuri-polessky/flashcards/events","assignees_url":"https://api.github.com/repos/yuri-polessky/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/yuri-polessky/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/yuri-polessky/flashcards/tags","blobs_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuri-polessky/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/yuri-polessky/flashcards/languages","stargazers_url":"https://api.github.com/repos/yuri-polessky/flashcards/stargazers","contributors_url":"https://api.github.com/repos/yuri-polessky/flashcards/contributors","subscribers_url":"https://api.github.com/repos/yuri-polessky/flashcards/subscribers","subscription_url":"https://api.github.com/repos/yuri-polessky/flashcards/subscription","commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuri-polessky/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuri-polessky/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/yuri-polessky/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuri-polessky/flashcards/merges","archive_url":"https://api.github.com/repos/yuri-polessky/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuri-polessky/flashcards/downloads","issues_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/yuri-polessky/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/yuri-polessky/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuri-polessky/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/yuri-polessky/flashcards/releases{/id}","created_at":"2015-08-31T08:35:45Z","updated_at":"2015-08-31T14:46:09Z","pushed_at":"2015-09-07T14:49:18Z","git_url":"git://github.com/yuri-polessky/flashcards.git","ssh_url":"git@github.com:yuri-polessky/flashcards.git","clone_url":"https://github.com/yuri-polessky/flashcards.git","svn_url":"https://github.com/yuri-polessky/flashcards","homepage":null,"size":344,"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":"yuri-polessky:master","ref":"master","sha":"21ac5903cf1929ef382ee6df6dc9e75cb0af9e47","user":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"repo":{"id":41664877,"name":"flashcards","full_name":"yuri-polessky/flashcards","owner":{"login":"yuri-polessky","id":9403076,"avatar_url":"https://avatars.githubusercontent.com/u/9403076?v=3","gravatar_id":"","url":"https://api.github.com/users/yuri-polessky","html_url":"https://github.com/yuri-polessky","followers_url":"https://api.github.com/users/yuri-polessky/followers","following_url":"https://api.github.com/users/yuri-polessky/following{/other_user}","gists_url":"https://api.github.com/users/yuri-polessky/gists{/gist_id}","starred_url":"https://api.github.com/users/yuri-polessky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuri-polessky/subscriptions","organizations_url":"https://api.github.com/users/yuri-polessky/orgs","repos_url":"https://api.github.com/users/yuri-polessky/repos","events_url":"https://api.github.com/users/yuri-polessky/events{/privacy}","received_events_url":"https://api.github.com/users/yuri-polessky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuri-polessky/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/yuri-polessky/flashcards","forks_url":"https://api.github.com/repos/yuri-polessky/flashcards/forks","keys_url":"https://api.github.com/repos/yuri-polessky/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuri-polessky/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuri-polessky/flashcards/teams","hooks_url":"https://api.github.com/repos/yuri-polessky/flashcards/hooks","issue_events_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/yuri-polessky/flashcards/events","assignees_url":"https://api.github.com/repos/yuri-polessky/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/yuri-polessky/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/yuri-polessky/flashcards/tags","blobs_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuri-polessky/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/yuri-polessky/flashcards/languages","stargazers_url":"https://api.github.com/repos/yuri-polessky/flashcards/stargazers","contributors_url":"https://api.github.com/repos/yuri-polessky/flashcards/contributors","subscribers_url":"https://api.github.com/repos/yuri-polessky/flashcards/subscribers","subscription_url":"https://api.github.com/repos/yuri-polessky/flashcards/subscription","commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuri-polessky/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuri-polessky/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuri-polessky/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/yuri-polessky/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuri-polessky/flashcards/merges","archive_url":"https://api.github.com/repos/yuri-polessky/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuri-polessky/flashcards/downloads","issues_url":"https://api.github.com/repos/yuri-polessky/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/yuri-polessky/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/yuri-polessky/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/yuri-polessky/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuri-polessky/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/yuri-polessky/flashcards/releases{/id}","created_at":"2015-08-31T08:35:45Z","updated_at":"2015-08-31T14:46:09Z","pushed_at":"2015-09-07T14:49:18Z","git_url":"git://github.com/yuri-polessky/flashcards.git","ssh_url":"git@github.com:yuri-polessky/flashcards.git","clone_url":"https://github.com/yuri-polessky/flashcards.git","svn_url":"https://github.com/yuri-polessky/flashcards","homepage":null,"size":344,"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/yuri-polessky/flashcards/pulls/12"},"html":{"href":"https://github.com/yuri-polessky/flashcards/pull/12"},"issue":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/issues/12"},"comments":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/yuri-polessky/flashcards/statuses/e76b50de8434faed71eb7e73be49ff85b9ed79e5"}}}}