{"action":"created","comment":{"url":"https://api.github.com/repos/odinsy/flashcards/pulls/comments/35497020","id":35497020,"diff_hunk":"@@ -50,4 +51,48 @@\n     end\n   end\n \n+  context \"when created a new card with Good parameters cards via method 'self.create_with_deck'\" do\n+\n+    it \"returns that the card is valid, if the deck is selected and title for new deck is not written\" do\n+      params = {original_text: \"Карта 1\", translated_text: \"Card 1\", deck_id: @deck.id, deck: {title: \"\", user_id: @user.id}, review_date: Date.today}\n+      card = Card.create_with_deck(params)\n+      expect(card.valid?).to eq(true)\n+    end\n+\n+    it \"returns that the card is valid, if the deck is not selected and title for new deck is written\" do\n+      params = {original_text: \"Карта 1\", translated_text: \"Card 1\", deck_id: \"\", deck: {title: \"Колода 2\", user_id: @user.id}, review_date: Date.today}\n+      card = Card.create_with_deck(params)\n+      expect(card.valid?).to eq(true)\n+    end\n+\n+    it \"returns that the card is not valid, if the deck is not selected and title for new deck is not written\" do\n+      params = {original_text: \"Карта 1\", translated_text: \"Card 1\", deck_id: \"\", deck: {title: \"\", user_id: @user.id}, review_date: Date.today}\n+      card = Card.create_with_deck(params)\n+      expect(card.valid?).to eq(false)\n+    end\n+","path":"spec/models/card_spec.rb","position":70,"original_position":70,"commit_id":"649f9d60c73ec1b798dee871d4af81fb1edcb086","original_commit_id":"649f9d60c73ec1b798dee871d4af81fb1edcb086","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-07-26T20:21:12Z","updated_at":"2015-07-26T20:21:12Z","html_url":"https://github.com/odinsy/flashcards/pull/11#discussion_r35497020","pull_request_url":"https://api.github.com/repos/odinsy/flashcards/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/comments/35497020"},"html":{"href":"https://github.com/odinsy/flashcards/pull/11#discussion_r35497020"},"pull_request":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/odinsy/flashcards/pulls/11","id":40825890,"html_url":"https://github.com/odinsy/flashcards/pull/11","diff_url":"https://github.com/odinsy/flashcards/pull/11.diff","patch_url":"https://github.com/odinsy/flashcards/pull/11.patch","issue_url":"https://api.github.com/repos/odinsy/flashcards/issues/11","number":11,"state":"open","locked":false,"title":"Added the deck","user":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"body":"- Added the deck. \r\n- Now, when you create a card, you must select or create a deck.\r\n- Added the ability to set the current deck.\r\n- Only one deck can be current.\r\n- On page 'Review'  displayed the random card of current user's deck or the random card from all user's decks.  ","created_at":"2015-07-24T23:52:45Z","updated_at":"2015-07-26T20:21:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d104826b42715e7398ac0459585964747db4aff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/odinsy/flashcards/pulls/11/commits","review_comments_url":"https://api.github.com/repos/odinsy/flashcards/pulls/11/comments","review_comment_url":"https://api.github.com/repos/odinsy/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odinsy/flashcards/issues/11/comments","statuses_url":"https://api.github.com/repos/odinsy/flashcards/statuses/649f9d60c73ec1b798dee871d4af81fb1edcb086","head":{"label":"odinsy:eleventh-task","ref":"eleventh-task","sha":"649f9d60c73ec1b798dee871d4af81fb1edcb086","user":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"repo":{"id":36316663,"name":"flashcards","full_name":"odinsy/flashcards","owner":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/odinsy/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/odinsy/flashcards","forks_url":"https://api.github.com/repos/odinsy/flashcards/forks","keys_url":"https://api.github.com/repos/odinsy/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odinsy/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odinsy/flashcards/teams","hooks_url":"https://api.github.com/repos/odinsy/flashcards/hooks","issue_events_url":"https://api.github.com/repos/odinsy/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/odinsy/flashcards/events","assignees_url":"https://api.github.com/repos/odinsy/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/odinsy/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/odinsy/flashcards/tags","blobs_url":"https://api.github.com/repos/odinsy/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odinsy/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odinsy/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/odinsy/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odinsy/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/odinsy/flashcards/languages","stargazers_url":"https://api.github.com/repos/odinsy/flashcards/stargazers","contributors_url":"https://api.github.com/repos/odinsy/flashcards/contributors","subscribers_url":"https://api.github.com/repos/odinsy/flashcards/subscribers","subscription_url":"https://api.github.com/repos/odinsy/flashcards/subscription","commits_url":"https://api.github.com/repos/odinsy/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/odinsy/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/odinsy/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/odinsy/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/odinsy/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/odinsy/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odinsy/flashcards/merges","archive_url":"https://api.github.com/repos/odinsy/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odinsy/flashcards/downloads","issues_url":"https://api.github.com/repos/odinsy/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/odinsy/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/odinsy/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/odinsy/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odinsy/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/odinsy/flashcards/releases{/id}","created_at":"2015-05-26T18:48:22Z","updated_at":"2015-05-27T11:38:00Z","pushed_at":"2015-07-26T20:21:04Z","git_url":"git://github.com/odinsy/flashcards.git","ssh_url":"git@github.com:odinsy/flashcards.git","clone_url":"https://github.com/odinsy/flashcards.git","svn_url":"https://github.com/odinsy/flashcards","homepage":null,"size":648,"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":"odinsy:master","ref":"master","sha":"983e28617d27cdf11fd3c4b96dcdf13d9d5b5d8a","user":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"repo":{"id":36316663,"name":"flashcards","full_name":"odinsy/flashcards","owner":{"login":"odinsy","id":12398444,"avatar_url":"https://avatars.githubusercontent.com/u/12398444?v=3","gravatar_id":"","url":"https://api.github.com/users/odinsy","html_url":"https://github.com/odinsy","followers_url":"https://api.github.com/users/odinsy/followers","following_url":"https://api.github.com/users/odinsy/following{/other_user}","gists_url":"https://api.github.com/users/odinsy/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsy/subscriptions","organizations_url":"https://api.github.com/users/odinsy/orgs","repos_url":"https://api.github.com/users/odinsy/repos","events_url":"https://api.github.com/users/odinsy/events{/privacy}","received_events_url":"https://api.github.com/users/odinsy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/odinsy/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/odinsy/flashcards","forks_url":"https://api.github.com/repos/odinsy/flashcards/forks","keys_url":"https://api.github.com/repos/odinsy/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odinsy/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odinsy/flashcards/teams","hooks_url":"https://api.github.com/repos/odinsy/flashcards/hooks","issue_events_url":"https://api.github.com/repos/odinsy/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/odinsy/flashcards/events","assignees_url":"https://api.github.com/repos/odinsy/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/odinsy/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/odinsy/flashcards/tags","blobs_url":"https://api.github.com/repos/odinsy/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odinsy/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odinsy/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/odinsy/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odinsy/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/odinsy/flashcards/languages","stargazers_url":"https://api.github.com/repos/odinsy/flashcards/stargazers","contributors_url":"https://api.github.com/repos/odinsy/flashcards/contributors","subscribers_url":"https://api.github.com/repos/odinsy/flashcards/subscribers","subscription_url":"https://api.github.com/repos/odinsy/flashcards/subscription","commits_url":"https://api.github.com/repos/odinsy/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/odinsy/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/odinsy/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/odinsy/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/odinsy/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/odinsy/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odinsy/flashcards/merges","archive_url":"https://api.github.com/repos/odinsy/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odinsy/flashcards/downloads","issues_url":"https://api.github.com/repos/odinsy/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/odinsy/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/odinsy/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/odinsy/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odinsy/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/odinsy/flashcards/releases{/id}","created_at":"2015-05-26T18:48:22Z","updated_at":"2015-05-27T11:38:00Z","pushed_at":"2015-07-26T20:21:04Z","git_url":"git://github.com/odinsy/flashcards.git","ssh_url":"git@github.com:odinsy/flashcards.git","clone_url":"https://github.com/odinsy/flashcards.git","svn_url":"https://github.com/odinsy/flashcards","homepage":null,"size":648,"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/odinsy/flashcards/pulls/11"},"html":{"href":"https://github.com/odinsy/flashcards/pull/11"},"issue":{"href":"https://api.github.com/repos/odinsy/flashcards/issues/11"},"comments":{"href":"https://api.github.com/repos/odinsy/flashcards/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odinsy/flashcards/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/odinsy/flashcards/statuses/649f9d60c73ec1b798dee871d4af81fb1edcb086"}}}}