GitHub PullRequestReviewCommentEvent at 2014-05-23 08:41:35
Repository: gitlabhq
Actor: houndci
Payload: {"comment":{"url":"https://api.github.com/repos/erbunao/gitlabhq/pulls/comments/12990362","id":12990362,"diff_hunk":"@@ -0,0 +1,44 @@\n+require('spec_helper')\n+\n+describe ProjectsController do\n+  let(:project) { create(:project) }\n+  let(:user)    { create(:user) }\n+  let(:png)     { fixture_file_upload(Rails.root + 'spec/fixtures/dk.png', 'image/png') }\n+  let(:jpg)     { fixture_file_upload(Rails.root + 'spec/fixtures/rails_sample.jpg', 'image/jpg') }\n+  let(:gif)     { fixture_file_upload(Rails.root + 'spec/fixtures/banana_sample.gif', 'image/gif') }\n+  let(:txt)     { fixture_file_upload(Rails.root + 'spec/fixtures/doc_sample.txt', 'text/plain') }\n+\n+  describe \"POST #upload_image\" do\n+    before do\n+      sign_in(user)\n+    end\n+\n+    context \"without params['markdown_img']\" do\n+      it \"returns an error\" do\n+        post :upload_image, id: project.to_param\n+        expect(response.status).to eq(404)\n+      end\n+    end\n+\n+    context \"with invalid file\" do\n+      before do\n+        post :upload_image, id: project.to_param, markdown_img: @img\n+      end\n+\n+      it \"returns an error\" do\n+        expect(response.status).to eq(404)\n+      end\n+    end\n+\n+    context \"with valid file\" do","path":"spec/controllers/projects_controller_spec.rb","position":33,"original_position":33,"commit_id":"6a85cdf1627629ecaa762fa60a7abdbd092cc20a","original_commit_id":"6a85cdf1627629ecaa762fa60a7abdbd092cc20a","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?","gravatar_id":"38d9cefd9971a05bf447f07c6cd332cc","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":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2014-05-23T08:41:35Z","updated_at":"2014-05-23T08:41:35Z","html_url":"https://github.com/erbunao/gitlabhq/pull/5#discussion_r12990362","pull_request_url":"https://api.github.com/repos/erbunao/gitlabhq/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/erbunao/gitlabhq/pulls/comments/12990362"},"html":{"href":"https://github.com/erbunao/gitlabhq/pull/5#discussion_r12990362"},"pull_request":{"href":"https://api.github.com/repos/erbunao/gitlabhq/pulls/5"}}}}