{"action":"created","comment":{"url":"https://api.github.com/repos/sichacvah/flashcards/pulls/comments/26003173","id":26003173,"diff_hunk":"@@ -4,25 +4,53 @@\n DatabaseCleaner.strategy = :truncation\n \n describe Card do\n-  before do\n+  before(:all) do\n     DatabaseCleaner.clean\n     user = create(:user, email: \"email@email.com\", password: \"****\",\n                          password_confirmation: \"****\")\n     deck = user.decks.create(name: \"Cat\")\n-    @card = deck.cards.create(translated_text: \"text\", original_text: \"текст\")\n+    @card = deck.cards.create(translated_text: \"text\", original_text: \"текст\", user_id: user.id)\n   end\n \n   subject { @card }\n \n   describe \"has true data in model\" do\n-    it { expect(@card.review_date).to eq(Date.today + 3.days) }\n+    it { expect(@card.review_date.to_i).to eq(DateTime.now.to_i) }\n     it { expect(@card.translated_text).to eq(\"text\") }\n     it { expect(@card.original_text).to eq(\"текст\") }\n   end\n \n-  describe \"is valid check translation\" do\n+  describe \"is valid first check translation\" do\n     it { expect(@card.check_translation(\"текст\")).to be true }\n-    it { expect(@card.review_date).to eq(Date.today + 3.days) }\n+    it do\n+      expect(@card.review_date.to_i)\n+      .to eq(DateTime.current.to_i + 12.hours.to_i)\n+    end\n+  end\n+\n+  describe \"is valid second check translation\" do\n+    it { expect(@card.check_translation(\"текст\")).to be true }\n+    it { expect(@card.review_date.to_i)\n+         .to eq(DateTime.current.to_i + 3.day.to_i) }\n+  end\n+\n+  describe \"is valid third check translation\" do\n+    it { expect(@card.check_translation(\"текст\")).to be true }\n+    it { expect(@card.review_date.to_i)\n+         .to eq(DateTime.current.to_i + 1.week.to_i) }\n+  end\n+\n+  describe \"is valid fourth check translation\" do\n+    it { expect(@card.check_translation(\"текст\")).to be true }\n+    it { expect(@card.review_date.to_i)\n+         .to eq(DateTime.current.to_i + 2.week.to_i) }\n+  end\n+\n+  describe \"is valid fifth check translation\" do\n+    it { expect(@card.check_translation(\"текст\")).to be true }\n+    future_date = DateTime.current + 1.month\n+    it { expect(@card.review_date.strftime(\"%Y:%m:%d\"))\n+         .to eq(future_date.strftime(\"%Y:%m:%d\")) }","path":"spec/models/card_spec.rb","position":55,"original_position":55,"commit_id":"44a5d8496e2dc36bc442e7441524105a9f094130","original_commit_id":"44a5d8496e2dc36bc442e7441524105a9f094130","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":"Expression at 53, 51 should be on its own line.<br>Place the . on the previous line, together with the method call receiver.<br>Use 2 (not 5) spaces for indenting an expression spanning multiple lines.","created_at":"2015-03-08T07:51:12Z","updated_at":"2015-03-08T07:51:12Z","html_url":"https://github.com/sichacvah/flashcards/pull/14#discussion_r26003173","pull_request_url":"https://api.github.com/repos/sichacvah/flashcards/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/comments/26003173"},"html":{"href":"https://github.com/sichacvah/flashcards/pull/14#discussion_r26003173"},"pull_request":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/sichacvah/flashcards/pulls/14","id":30704296,"html_url":"https://github.com/sichacvah/flashcards/pull/14","diff_url":"https://github.com/sichacvah/flashcards/pull/14.diff","patch_url":"https://github.com/sichacvah/flashcards/pull/14.patch","issue_url":"https://api.github.com/repos/sichacvah/flashcards/issues/14","number":14,"state":"open","locked":false,"title":"spaced repetition","user":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-07T15:33:33Z","updated_at":"2015-03-08T07:51:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3353ec98839d6f5ed736453a8231ab71980b02be","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sichacvah/flashcards/pulls/14/commits","review_comments_url":"https://api.github.com/repos/sichacvah/flashcards/pulls/14/comments","review_comment_url":"https://api.github.com/repos/sichacvah/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sichacvah/flashcards/issues/14/comments","statuses_url":"https://api.github.com/repos/sichacvah/flashcards/statuses/44a5d8496e2dc36bc442e7441524105a9f094130","head":{"label":"sichacvah:spaced-repetition","ref":"spaced-repetition","sha":"44a5d8496e2dc36bc442e7441524105a9f094130","user":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"repo":{"id":31115461,"name":"flashcards","full_name":"sichacvah/flashcards","owner":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sichacvah/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/sichacvah/flashcards","forks_url":"https://api.github.com/repos/sichacvah/flashcards/forks","keys_url":"https://api.github.com/repos/sichacvah/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sichacvah/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sichacvah/flashcards/teams","hooks_url":"https://api.github.com/repos/sichacvah/flashcards/hooks","issue_events_url":"https://api.github.com/repos/sichacvah/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/sichacvah/flashcards/events","assignees_url":"https://api.github.com/repos/sichacvah/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/sichacvah/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/sichacvah/flashcards/tags","blobs_url":"https://api.github.com/repos/sichacvah/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sichacvah/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sichacvah/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/sichacvah/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sichacvah/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/sichacvah/flashcards/languages","stargazers_url":"https://api.github.com/repos/sichacvah/flashcards/stargazers","contributors_url":"https://api.github.com/repos/sichacvah/flashcards/contributors","subscribers_url":"https://api.github.com/repos/sichacvah/flashcards/subscribers","subscription_url":"https://api.github.com/repos/sichacvah/flashcards/subscription","commits_url":"https://api.github.com/repos/sichacvah/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/sichacvah/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/sichacvah/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/sichacvah/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/sichacvah/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/sichacvah/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sichacvah/flashcards/merges","archive_url":"https://api.github.com/repos/sichacvah/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sichacvah/flashcards/downloads","issues_url":"https://api.github.com/repos/sichacvah/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/sichacvah/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/sichacvah/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/sichacvah/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sichacvah/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/sichacvah/flashcards/releases{/id}","created_at":"2015-02-21T04:39:19Z","updated_at":"2015-03-07T12:27:06Z","pushed_at":"2015-03-08T07:51:01Z","git_url":"git://github.com/sichacvah/flashcards.git","ssh_url":"git@github.com:sichacvah/flashcards.git","clone_url":"https://github.com/sichacvah/flashcards.git","svn_url":"https://github.com/sichacvah/flashcards","homepage":null,"size":33947,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sichacvah:master","ref":"master","sha":"4d5bf81227f93c63bd6a74671cbec5329952ce24","user":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"repo":{"id":31115461,"name":"flashcards","full_name":"sichacvah/flashcards","owner":{"login":"sichacvah","id":6375582,"avatar_url":"https://avatars.githubusercontent.com/u/6375582?v=3","gravatar_id":"","url":"https://api.github.com/users/sichacvah","html_url":"https://github.com/sichacvah","followers_url":"https://api.github.com/users/sichacvah/followers","following_url":"https://api.github.com/users/sichacvah/following{/other_user}","gists_url":"https://api.github.com/users/sichacvah/gists{/gist_id}","starred_url":"https://api.github.com/users/sichacvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sichacvah/subscriptions","organizations_url":"https://api.github.com/users/sichacvah/orgs","repos_url":"https://api.github.com/users/sichacvah/repos","events_url":"https://api.github.com/users/sichacvah/events{/privacy}","received_events_url":"https://api.github.com/users/sichacvah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sichacvah/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/sichacvah/flashcards","forks_url":"https://api.github.com/repos/sichacvah/flashcards/forks","keys_url":"https://api.github.com/repos/sichacvah/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sichacvah/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sichacvah/flashcards/teams","hooks_url":"https://api.github.com/repos/sichacvah/flashcards/hooks","issue_events_url":"https://api.github.com/repos/sichacvah/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/sichacvah/flashcards/events","assignees_url":"https://api.github.com/repos/sichacvah/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/sichacvah/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/sichacvah/flashcards/tags","blobs_url":"https://api.github.com/repos/sichacvah/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sichacvah/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sichacvah/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/sichacvah/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sichacvah/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/sichacvah/flashcards/languages","stargazers_url":"https://api.github.com/repos/sichacvah/flashcards/stargazers","contributors_url":"https://api.github.com/repos/sichacvah/flashcards/contributors","subscribers_url":"https://api.github.com/repos/sichacvah/flashcards/subscribers","subscription_url":"https://api.github.com/repos/sichacvah/flashcards/subscription","commits_url":"https://api.github.com/repos/sichacvah/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/sichacvah/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/sichacvah/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/sichacvah/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/sichacvah/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/sichacvah/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sichacvah/flashcards/merges","archive_url":"https://api.github.com/repos/sichacvah/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sichacvah/flashcards/downloads","issues_url":"https://api.github.com/repos/sichacvah/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/sichacvah/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/sichacvah/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/sichacvah/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sichacvah/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/sichacvah/flashcards/releases{/id}","created_at":"2015-02-21T04:39:19Z","updated_at":"2015-03-07T12:27:06Z","pushed_at":"2015-03-08T07:51:01Z","git_url":"git://github.com/sichacvah/flashcards.git","ssh_url":"git@github.com:sichacvah/flashcards.git","clone_url":"https://github.com/sichacvah/flashcards.git","svn_url":"https://github.com/sichacvah/flashcards","homepage":null,"size":33947,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/14"},"html":{"href":"https://github.com/sichacvah/flashcards/pull/14"},"issue":{"href":"https://api.github.com/repos/sichacvah/flashcards/issues/14"},"comments":{"href":"https://api.github.com/repos/sichacvah/flashcards/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sichacvah/flashcards/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/sichacvah/flashcards/statuses/44a5d8496e2dc36bc442e7441524105a9f094130"}}}}