GitHub PullRequestReviewCommentEvent at 2014-04-07 08:38:17
Repository: katello
Actor: pitr-ch
Payload: {"comment":{"url":"https://api.github.com/repos/Katello/katello/pulls/comments/11334882","id":11334882,"diff_hunk":"@@ -21,30 +21,52 @@ class TestBase < ActiveSupport::TestCase\n       stub_remote_user\n     end\n \n-    let(:planned_action) do\n-      create_and_plan_action action_class,\n-                             remote_id: 'user_id'\n-    end\n-  end\n-\n-  class CreateTest < TestBase\n-    let(:action_class) { ::Actions::Pulp::User::Create }\n+    describe 'Create' do\n+      it 'runs' do\n+        planned_action = create_and_plan_action ::Actions::Pulp::User::Create,\n+                                                remote_id: 'user_id'\n \n-    it 'runs' do\n-      run_action planned_action do |action|\n-        runcible_expects(action, :resources, :user, :create)\n+        run_action planned_action do |action|\n+          runcible_expects(action, :resources, :user, :create)\n+        end\n       end\n     end\n-  end\n \n-  class SetSuperuserTest < TestBase\n-    let(:action_class) { ::Actions::Pulp::User::SetSuperuser }\n+    describe 'Superuser' do\n \n-    it 'runs' do\n-      run_action planned_action do |action|\n-        runcible_expects(action, :resources, :role, :add)\n+      { ::Actions::Pulp::Superuser::Add    => :add,\n+        ::Actions::Pulp::Superuser::Remove => :remove\n+      }.each do |action, method|\n+        describe action.to_s.demodulize do\n+          specify do\n+            planned_action = create_and_plan_action action,\n+                                                    remote_id: 'user_id'\n+            run_action planned_action do |action|\n+              runcible_expects(action, :resources, :role, method)\n+            end\n+          end\n+        end\n       end\n     end\n   end\n-end\n \n+  # class CreateTest < TestBase\n+  #   let(:action_class) { ::Actions::Pulp::User::Create }\n+  #\n+  #   it 'runs' do\n+  #     run_action planned_action do |action|\n+  #       runcible_expects(action, :resources, :user, :create)\n+  #     end\n+  #   end\n+  # end\n+  #\n+  # class SetSuperuserTest < TestBase\n+  #   let(:action_class) { ::Actions::Pulp::User::SetSuperuser }\n+  #\n+  #   it 'runs' do\n+  #     run_action planned_action do |action|\n+  #       runcible_expects(action, :resources, :role, :add)\n+  #     end\n+  #   end\n+  # end","path":"test/actions/pulp/user_test.rb","position":69,"original_position":69,"commit_id":"f139c536c8736b23efaf523615e766e5c545d7a6","original_commit_id":"f139c536c8736b23efaf523615e766e5c545d7a6","user":{"login":"pitr-ch","id":204460,"avatar_url":"https://avatars.githubusercontent.com/u/204460?","gravatar_id":"1390a7fcbc3337885de95bb9b1bcecfd","url":"https://api.github.com/users/pitr-ch","html_url":"https://github.com/pitr-ch","followers_url":"https://api.github.com/users/pitr-ch/followers","following_url":"https://api.github.com/users/pitr-ch/following{/other_user}","gists_url":"https://api.github.com/users/pitr-ch/gists{/gist_id}","starred_url":"https://api.github.com/users/pitr-ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pitr-ch/subscriptions","organizations_url":"https://api.github.com/users/pitr-ch/orgs","repos_url":"https://api.github.com/users/pitr-ch/repos","events_url":"https://api.github.com/users/pitr-ch/events{/privacy}","received_events_url":"https://api.github.com/users/pitr-ch/received_events","type":"User","site_admin":false},"body":"A mistake :) Removing.","created_at":"2014-04-07T08:38:17Z","updated_at":"2014-04-07T08:38:17Z","html_url":"https://github.com/Katello/katello/pull/3740#discussion_r11334882","pull_request_url":"https://api.github.com/repos/Katello/katello/pulls/3740","_links":{"self":{"href":"https://api.github.com/repos/Katello/katello/pulls/comments/11334882"},"html":{"href":"https://github.com/Katello/katello/pull/3740#discussion_r11334882"},"pull_request":{"href":"https://api.github.com/repos/Katello/katello/pulls/3740"}}}}