{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/cwsb_01/pulls/comments/84861985","pull_request_review_id":5611481,"id":84861985,"diff_hunk":"@@ -0,0 +1,83 @@\n+require \"rails_helper\"\n+RSpec.describe AmenitiesController do\n+  let(:venue) {FactoryGirl.create :venue}\n+  describe \"GET #index\" do\n+    it \"select all price_types and render index\" do\n+      get :index, {venue_id: venue.id}, price_types: PriceType.all\n+    end\n+  end\n+\n+  describe \"GET #new\" do\n+    let(:amenity) {FactoryGirl.create :amenity}\n+    let(:invalid_venue) {FactoryGirl.create(:venue, name: nil)}\n+    it \"assigns a new Amenity to @amenity\" do\n+      get :new, {venue_id: venue.id}\n+      response.should render_template :new\n+    end\n+  end\n+\n+  describe \"POST #create\" do\n+    it \"Create a new Amenity successfully\" do\n+      expect {post :create, {venue_id: venue.id,\n+        amenity: FactoryGirl.attributes_for(:amenity)}}\n+        .to change(Amenity, :count).by(1)\n+    end\n+\n+    it \"Does not create new Amenity successfully\" do\n+      expect {post :create, {venue_id: venue.id,\n+        amenity: FactoryGirl.attributes_for(:amenity, name: nil)}}\n+        .to_not change(Amenity, :count)\n+    end\n+\n+    it \"expect to display flash fail\" do\n+      post :create, {params: {venue_id: 4}}\n+      expect(flash[:danger]).not_to be_empty\n+    end\n+  end\n+\n+  describe \"PUT #update\" do\n+    before :each do\n+      @amenity = FactoryGirl.create(:amenity)","path":"spec/controllers/create_amenities/amenities_controller_spec.rb","position":40,"original_position":40,"commit_id":"46b7a18102d9310869460cd4b668fb87ad702846","original_commit_id":"46b7a18102d9310869460cd4b668fb87ad702846","user":{"login":"NguyenHoangAnhDung","id":21093421,"avatar_url":"https://avatars.githubusercontent.com/u/21093421?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenHoangAnhDung","html_url":"https://github.com/NguyenHoangAnhDung","followers_url":"https://api.github.com/users/NguyenHoangAnhDung/followers","following_url":"https://api.github.com/users/NguyenHoangAnhDung/following{/other_user}","gists_url":"https://api.github.com/users/NguyenHoangAnhDung/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenHoangAnhDung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenHoangAnhDung/subscriptions","organizations_url":"https://api.github.com/users/NguyenHoangAnhDung/orgs","repos_url":"https://api.github.com/users/NguyenHoangAnhDung/repos","events_url":"https://api.github.com/users/NguyenHoangAnhDung/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenHoangAnhDung/received_events","type":"User","site_admin":false},"body":"@amenity có sử dụng ở dưới nên để rứa","created_at":"2016-10-25T09:23:55Z","updated_at":"2016-10-25T09:28:46Z","html_url":"https://github.com/framgia/cwsb_01/pull/15#discussion_r84861985","pull_request_url":"https://api.github.com/repos/framgia/cwsb_01/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/comments/84861985"},"html":{"href":"https://github.com/framgia/cwsb_01/pull/15#discussion_r84861985"},"pull_request":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/cwsb_01/pulls/15","id":90583578,"html_url":"https://github.com/framgia/cwsb_01/pull/15","diff_url":"https://github.com/framgia/cwsb_01/pull/15.diff","patch_url":"https://github.com/framgia/cwsb_01/pull/15.patch","issue_url":"https://api.github.com/repos/framgia/cwsb_01/issues/15","number":15,"state":"open","locked":false,"title":"test create amenity","user":{"login":"NguyenHoangAnhDung","id":21093421,"avatar_url":"https://avatars.githubusercontent.com/u/21093421?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenHoangAnhDung","html_url":"https://github.com/NguyenHoangAnhDung","followers_url":"https://api.github.com/users/NguyenHoangAnhDung/followers","following_url":"https://api.github.com/users/NguyenHoangAnhDung/following{/other_user}","gists_url":"https://api.github.com/users/NguyenHoangAnhDung/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenHoangAnhDung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenHoangAnhDung/subscriptions","organizations_url":"https://api.github.com/users/NguyenHoangAnhDung/orgs","repos_url":"https://api.github.com/users/NguyenHoangAnhDung/repos","events_url":"https://api.github.com/users/NguyenHoangAnhDung/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenHoangAnhDung/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-24T10:12:38Z","updated_at":"2016-10-25T09:28:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73e8ac3e31c3be002a37c07e66f1acfe6c00399f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/cwsb_01/pulls/15/commits","review_comments_url":"https://api.github.com/repos/framgia/cwsb_01/pulls/15/comments","review_comment_url":"https://api.github.com/repos/framgia/cwsb_01/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/cwsb_01/issues/15/comments","statuses_url":"https://api.github.com/repos/framgia/cwsb_01/statuses/46b7a18102d9310869460cd4b668fb87ad702846","head":{"label":"NguyenHoangAnhDung:test_for_create_amenity","ref":"test_for_create_amenity","sha":"46b7a18102d9310869460cd4b668fb87ad702846","user":{"login":"NguyenHoangAnhDung","id":21093421,"avatar_url":"https://avatars.githubusercontent.com/u/21093421?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenHoangAnhDung","html_url":"https://github.com/NguyenHoangAnhDung","followers_url":"https://api.github.com/users/NguyenHoangAnhDung/followers","following_url":"https://api.github.com/users/NguyenHoangAnhDung/following{/other_user}","gists_url":"https://api.github.com/users/NguyenHoangAnhDung/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenHoangAnhDung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenHoangAnhDung/subscriptions","organizations_url":"https://api.github.com/users/NguyenHoangAnhDung/orgs","repos_url":"https://api.github.com/users/NguyenHoangAnhDung/repos","events_url":"https://api.github.com/users/NguyenHoangAnhDung/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenHoangAnhDung/received_events","type":"User","site_admin":false},"repo":{"id":69952040,"name":"cwsb_01","full_name":"NguyenHoangAnhDung/cwsb_01","owner":{"login":"NguyenHoangAnhDung","id":21093421,"avatar_url":"https://avatars.githubusercontent.com/u/21093421?v=3","gravatar_id":"","url":"https://api.github.com/users/NguyenHoangAnhDung","html_url":"https://github.com/NguyenHoangAnhDung","followers_url":"https://api.github.com/users/NguyenHoangAnhDung/followers","following_url":"https://api.github.com/users/NguyenHoangAnhDung/following{/other_user}","gists_url":"https://api.github.com/users/NguyenHoangAnhDung/gists{/gist_id}","starred_url":"https://api.github.com/users/NguyenHoangAnhDung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NguyenHoangAnhDung/subscriptions","organizations_url":"https://api.github.com/users/NguyenHoangAnhDung/orgs","repos_url":"https://api.github.com/users/NguyenHoangAnhDung/repos","events_url":"https://api.github.com/users/NguyenHoangAnhDung/events{/privacy}","received_events_url":"https://api.github.com/users/NguyenHoangAnhDung/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NguyenHoangAnhDung/cwsb_01","description":"Co-working space booking system - Danang Education's project","fork":true,"url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01","forks_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/forks","keys_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/teams","hooks_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/hooks","issue_events_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/issues/events{/number}","events_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/events","assignees_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/assignees{/user}","branches_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/branches{/branch}","tags_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/tags","blobs_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/statuses/{sha}","languages_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/languages","stargazers_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/stargazers","contributors_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/contributors","subscribers_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/subscribers","subscription_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/subscription","commits_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/contents/{+path}","compare_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/merges","archive_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/downloads","issues_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/issues{/number}","pulls_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/pulls{/number}","milestones_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/milestones{/number}","notifications_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/labels{/name}","releases_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/releases{/id}","deployments_url":"https://api.github.com/repos/NguyenHoangAnhDung/cwsb_01/deployments","created_at":"2016-10-04T09:44:55Z","updated_at":"2016-10-04T03:49:56Z","pushed_at":"2016-10-25T08:41:23Z","git_url":"git://github.com/NguyenHoangAnhDung/cwsb_01.git","ssh_url":"git@github.com:NguyenHoangAnhDung/cwsb_01.git","clone_url":"https://github.com/NguyenHoangAnhDung/cwsb_01.git","svn_url":"https://github.com/NguyenHoangAnhDung/cwsb_01","homepage":null,"size":3769,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"09785d950b277b80a0f225b33f95f17916ae30db","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":69932509,"name":"cwsb_01","full_name":"framgia/cwsb_01","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/cwsb_01","description":"Co-working space booking system - Danang Education's project","fork":false,"url":"https://api.github.com/repos/framgia/cwsb_01","forks_url":"https://api.github.com/repos/framgia/cwsb_01/forks","keys_url":"https://api.github.com/repos/framgia/cwsb_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/cwsb_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/cwsb_01/teams","hooks_url":"https://api.github.com/repos/framgia/cwsb_01/hooks","issue_events_url":"https://api.github.com/repos/framgia/cwsb_01/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/cwsb_01/events","assignees_url":"https://api.github.com/repos/framgia/cwsb_01/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/cwsb_01/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/cwsb_01/tags","blobs_url":"https://api.github.com/repos/framgia/cwsb_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/cwsb_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/cwsb_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/cwsb_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/cwsb_01/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/cwsb_01/languages","stargazers_url":"https://api.github.com/repos/framgia/cwsb_01/stargazers","contributors_url":"https://api.github.com/repos/framgia/cwsb_01/contributors","subscribers_url":"https://api.github.com/repos/framgia/cwsb_01/subscribers","subscription_url":"https://api.github.com/repos/framgia/cwsb_01/subscription","commits_url":"https://api.github.com/repos/framgia/cwsb_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/cwsb_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/cwsb_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/cwsb_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/cwsb_01/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/cwsb_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/cwsb_01/merges","archive_url":"https://api.github.com/repos/framgia/cwsb_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/cwsb_01/downloads","issues_url":"https://api.github.com/repos/framgia/cwsb_01/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/cwsb_01/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/cwsb_01/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/cwsb_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/cwsb_01/labels{/name}","releases_url":"https://api.github.com/repos/framgia/cwsb_01/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/cwsb_01/deployments","created_at":"2016-10-04T03:49:56Z","updated_at":"2016-10-04T03:49:56Z","pushed_at":"2016-10-25T08:41:23Z","git_url":"git://github.com/framgia/cwsb_01.git","ssh_url":"git@github.com:framgia/cwsb_01.git","clone_url":"https://github.com/framgia/cwsb_01.git","svn_url":"https://github.com/framgia/cwsb_01","homepage":null,"size":3835,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/15"},"html":{"href":"https://github.com/framgia/cwsb_01/pull/15"},"issue":{"href":"https://api.github.com/repos/framgia/cwsb_01/issues/15"},"comments":{"href":"https://api.github.com/repos/framgia/cwsb_01/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/cwsb_01/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/cwsb_01/statuses/46b7a18102d9310869460cd4b668fb87ad702846"}}}}
{"actor":{"display_login":"NguyenHoangAnhDung"}}