{"action":"created","comment":{"url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/comments/41833448","id":41833448,"diff_hunk":"@@ -0,0 +1,126 @@\n+require \"rails_helper\"\n+require \"support/helpers/login_helper.rb\"\n+require \"support/helpers/wait_for_ajax.rb\"\n+include LoginHelper\n+include WaitForAjax\n+\n+describe \"Add Flickr photo to card\" do\n+  let!(:user) { create(:user) }\n+  let!(:block) { create(:block, user: user) }\n+  let(:photo) { page.find(\"#thumbnail_0\") }\n+  let(:start_search) do\n+    page.find(\"#flickr_button\").click\n+    click_button 'GO'\n+  end\n+\n+  before do\n+    login_with(\"test@test.com\", \"12345\", \"Войти\")\n+    visit new_card_path\n+  end\n+\n+  describe 'when user visits new card page', js: true do\n+\n+    it \"shows Search Flickr button\" do\n+      expect(page).to have_content('Search Flickr')\n+    end\n+\n+    it \"remote_image_url textfield is hidden and blank\" do\n+      expect(page.find(\".remote_url\").visible?).to eq(false)\n+    end\n+\n+    it \"loading indicator is hidden\" do\n+      expect(page.find(\".loader\").visible?).to eq(false)\n+    end\n+\n+    it 'search form is hidden' do\n+      expect(page.find(\".flickr_search\").visible?).to eq(false)\n+    end\n+  end\n+\n+  describe 'when user clicks Try Flickr button', js: true do\n+    before do\n+      page.find(\"#flickr_button\").click\n+    end\n+\n+    it \"shows search form when user pressed button\" do\n+      expect(page.find(\".flickr_search\").visible?).to eq(true)\n+    end\n+  end\n+\n+  describe 'when user clicks GO button for searching photos', js: true do\n+    before do\n+      start_search\n+    end\n+\n+    it \"shows loading indicator when user pressed button to search\" do\n+      expect(page.find(\".loader\").visible?).to eq(true)\n+    end\n+  end\n+\n+  describe 'when search request is completed', js: true do\n+    # let!(:photos) do\n+    #   [\n+    #     \"https://farm6.staticflickr.com/5742/21488769794_9fd96e7eb6_q.jpg\",\n+    #     \"https://farm1.staticflickr.com/601/21923710398_52b0732469_q.jpg\",\n+    #     \"https://farm1.staticflickr.com/705/21923710458_6fcb52ee05_q.jpg\",\n+    #     \"https://farm6.staticflickr.com/5727/22085412296_74760fb3f6_q.jpg\",\n+    #     \"https://farm1.staticflickr.com/688/22085412486_6a861b5e09_q.jpg\",\n+    #     \"https://farm1.staticflickr.com/618/22085412706_f3a85c67ef_q.jpg\",\n+    #     \"https://farm6.staticflickr.com/5724/22111607515_568962fa65_q.jpg\",\n+    #     \"https://farm1.staticflickr.com/585/22111607615_c35cff43db_q.jpg\",\n+    #     \"https://farm1.staticflickr.com/746/22111607905_cf03bc7571_q.jpg\",\n+    #     \"https://farm6.staticflickr.com/5760/22111608245_8886649659_q.jpg\"\n+    #   ]\n+    # end\n+    before do\n+      # allow_any_instance_of(Dashboard::FlickrSearchController).to receive(:url_for_photos).and_return(photos)\n+      start_search\n+      wait_for_ajax\n+    end\n+    ","path":"spec/features/add_flickr_photo_to_card_spec.rb","position":80,"original_position":80,"commit_id":"8896254f2da82ba8d350cc6c3fc27a55356ed766","original_commit_id":"8896254f2da82ba8d350cc6c3fc27a55356ed766","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":"Trailing whitespace detected.","created_at":"2015-10-13T07:16:59Z","updated_at":"2015-10-13T07:16:59Z","html_url":"https://github.com/ArmadilloXX/flashcards/pull/6#discussion_r41833448","pull_request_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/comments/41833448"},"html":{"href":"https://github.com/ArmadilloXX/flashcards/pull/6#discussion_r41833448"},"pull_request":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/6","id":47369743,"html_url":"https://github.com/ArmadilloXX/flashcards/pull/6","diff_url":"https://github.com/ArmadilloXX/flashcards/pull/6.diff","patch_url":"https://github.com/ArmadilloXX/flashcards/pull/6.patch","issue_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/6","number":6,"state":"open","locked":false,"title":"Fourth task","user":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-11T16:00:27Z","updated_at":"2015-10-13T07:16:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ab6deff4cd9b85f38d30a6f5f053811d115bb7d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/6/commits","review_comments_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/6/comments","review_comment_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/6/comments","statuses_url":"https://api.github.com/repos/ArmadilloXX/flashcards/statuses/8896254f2da82ba8d350cc6c3fc27a55356ed766","head":{"label":"ArmadilloXX:fourth_task","ref":"fourth_task","sha":"8896254f2da82ba8d350cc6c3fc27a55356ed766","user":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"repo":{"id":42848111,"name":"flashcards","full_name":"ArmadilloXX/flashcards","owner":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArmadilloXX/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/ArmadilloXX/flashcards","forks_url":"https://api.github.com/repos/ArmadilloXX/flashcards/forks","keys_url":"https://api.github.com/repos/ArmadilloXX/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArmadilloXX/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArmadilloXX/flashcards/teams","hooks_url":"https://api.github.com/repos/ArmadilloXX/flashcards/hooks","issue_events_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/ArmadilloXX/flashcards/events","assignees_url":"https://api.github.com/repos/ArmadilloXX/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/ArmadilloXX/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/ArmadilloXX/flashcards/tags","blobs_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArmadilloXX/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/ArmadilloXX/flashcards/languages","stargazers_url":"https://api.github.com/repos/ArmadilloXX/flashcards/stargazers","contributors_url":"https://api.github.com/repos/ArmadilloXX/flashcards/contributors","subscribers_url":"https://api.github.com/repos/ArmadilloXX/flashcards/subscribers","subscription_url":"https://api.github.com/repos/ArmadilloXX/flashcards/subscription","commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArmadilloXX/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArmadilloXX/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/ArmadilloXX/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArmadilloXX/flashcards/merges","archive_url":"https://api.github.com/repos/ArmadilloXX/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArmadilloXX/flashcards/downloads","issues_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/ArmadilloXX/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/ArmadilloXX/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArmadilloXX/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/ArmadilloXX/flashcards/releases{/id}","created_at":"2015-09-21T06:32:52Z","updated_at":"2015-09-21T06:34:53Z","pushed_at":"2015-10-13T07:16:50Z","git_url":"git://github.com/ArmadilloXX/flashcards.git","ssh_url":"git@github.com:ArmadilloXX/flashcards.git","clone_url":"https://github.com/ArmadilloXX/flashcards.git","svn_url":"https://github.com/ArmadilloXX/flashcards","homepage":null,"size":442,"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":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ArmadilloXX:master","ref":"master","sha":"c627569a352ca1c1df62b54656536aa3012e502d","user":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"repo":{"id":42848111,"name":"flashcards","full_name":"ArmadilloXX/flashcards","owner":{"login":"ArmadilloXX","id":6916657,"avatar_url":"https://avatars.githubusercontent.com/u/6916657?v=3","gravatar_id":"","url":"https://api.github.com/users/ArmadilloXX","html_url":"https://github.com/ArmadilloXX","followers_url":"https://api.github.com/users/ArmadilloXX/followers","following_url":"https://api.github.com/users/ArmadilloXX/following{/other_user}","gists_url":"https://api.github.com/users/ArmadilloXX/gists{/gist_id}","starred_url":"https://api.github.com/users/ArmadilloXX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArmadilloXX/subscriptions","organizations_url":"https://api.github.com/users/ArmadilloXX/orgs","repos_url":"https://api.github.com/users/ArmadilloXX/repos","events_url":"https://api.github.com/users/ArmadilloXX/events{/privacy}","received_events_url":"https://api.github.com/users/ArmadilloXX/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArmadilloXX/flashcards","description":"","fork":false,"url":"https://api.github.com/repos/ArmadilloXX/flashcards","forks_url":"https://api.github.com/repos/ArmadilloXX/flashcards/forks","keys_url":"https://api.github.com/repos/ArmadilloXX/flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArmadilloXX/flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArmadilloXX/flashcards/teams","hooks_url":"https://api.github.com/repos/ArmadilloXX/flashcards/hooks","issue_events_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/ArmadilloXX/flashcards/events","assignees_url":"https://api.github.com/repos/ArmadilloXX/flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/ArmadilloXX/flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/ArmadilloXX/flashcards/tags","blobs_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArmadilloXX/flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/ArmadilloXX/flashcards/languages","stargazers_url":"https://api.github.com/repos/ArmadilloXX/flashcards/stargazers","contributors_url":"https://api.github.com/repos/ArmadilloXX/flashcards/contributors","subscribers_url":"https://api.github.com/repos/ArmadilloXX/flashcards/subscribers","subscription_url":"https://api.github.com/repos/ArmadilloXX/flashcards/subscription","commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArmadilloXX/flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArmadilloXX/flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArmadilloXX/flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/ArmadilloXX/flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArmadilloXX/flashcards/merges","archive_url":"https://api.github.com/repos/ArmadilloXX/flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArmadilloXX/flashcards/downloads","issues_url":"https://api.github.com/repos/ArmadilloXX/flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/ArmadilloXX/flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/ArmadilloXX/flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArmadilloXX/flashcards/labels{/name}","releases_url":"https://api.github.com/repos/ArmadilloXX/flashcards/releases{/id}","created_at":"2015-09-21T06:32:52Z","updated_at":"2015-09-21T06:34:53Z","pushed_at":"2015-10-13T07:16:50Z","git_url":"git://github.com/ArmadilloXX/flashcards.git","ssh_url":"git@github.com:ArmadilloXX/flashcards.git","clone_url":"https://github.com/ArmadilloXX/flashcards.git","svn_url":"https://github.com/ArmadilloXX/flashcards","homepage":null,"size":442,"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":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/6"},"html":{"href":"https://github.com/ArmadilloXX/flashcards/pull/6"},"issue":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/6"},"comments":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/ArmadilloXX/flashcards/statuses/8896254f2da82ba8d350cc6c3fc27a55356ed766"}}}}