{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/comments/228225084","pull_request_review_id":168442836,"id":228225084,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODIyNTA4NA==","diff_hunk":"@@ -0,0 +1,44 @@\n+describe ServiceOffering do\n+  let(:api_instance) { double(:api_instance, :show_service_offering => service_offering) }\n+  let(:service_offering) { ServiceOffering.new(params) }\n+  let(:params) { {'service_offering_ref' => '10'} }\n+\n+  it \"#{described_class}#find\" do\n+    with_modified_env TOPOLOGY_SERVICE_URL: 'http://www.example.com' do\n+      allow(service_offering).to receive(:api_instance).and_return(api_instance)\n+      expect(described_class).to receive(:new).with({}).and_return(service_offering)\n+      ServiceOffering.find(1)\n+    end\n+  end\n+\n+  it \"#show\" do\n+    with_modified_env TOPOLOGY_SERVICE_URL: 'http://www.example.com' do\n+      allow(service_offering).to receive(:api_instance).and_return(api_instance)\n+      expect(api_instance).to receive(:show_service_offering).with('10')\n+      service_offering.show('10')\n+    end\n+  end\n+\n+  it \"#to_service_params\" do\n+    service_params = nil\n+    with_modified_env TOPOLOGY_SERVICE_URL: 'http://www.example.com' do\n+      service_offering.instance_variable_set(:@name, 'test name')\n+      service_offering.instance_variable_set(:@description, 'test description')\n+      service_offering.instance_variable_set(:@service_offering_ref, '12')\n+      service_params = service_offering.to_service_params\n+\n+      expect(service_params).to be_a Hash\n+      expect(service_params.count).to eql 3\n+      expect(service_params).to include(\n+        'name'                  => 'test name',\n+        'description'           => 'test description',\n+        'service_offering_ref'  => '12'\n+      )\n+    end\n+\n+  end\n+\n+  def with_modified_env(options, &block)\n+    ClimateControl.modify(options, &block)\n+  end","path":"spec/services/service_offering_spec.rb","position":43,"original_position":43,"commit_id":"3f0ba14edcd944cc6319ebe4436cbc563bc06b0c","original_commit_id":"9012aa0a4108b6e545bb1f3065d3108fd62fcc95","user":{"login":"eclarizio","id":164557,"node_id":"MDQ6VXNlcjE2NDU1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/164557?v=4","gravatar_id":"","url":"https://api.github.com/users/eclarizio","html_url":"https://github.com/eclarizio","followers_url":"https://api.github.com/users/eclarizio/followers","following_url":"https://api.github.com/users/eclarizio/following{/other_user}","gists_url":"https://api.github.com/users/eclarizio/gists{/gist_id}","starred_url":"https://api.github.com/users/eclarizio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclarizio/subscriptions","organizations_url":"https://api.github.com/users/eclarizio/orgs","repos_url":"https://api.github.com/users/eclarizio/repos","events_url":"https://api.github.com/users/eclarizio/events{/privacy}","received_events_url":"https://api.github.com/users/eclarizio/received_events","type":"User","site_admin":false},"body":"This is already used in the `service_plans_spec`, right? Maybe we can break it out into a helper file and then include that in the RSpec configuration. Could probably be a separate PR, though.","created_at":"2018-10-25T15:34:36Z","updated_at":"2018-10-25T15:59:00Z","html_url":"https://github.com/ManageIQ/service_portal-api/pull/33#discussion_r228225084","pull_request_url":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/33","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/comments/228225084"},"html":{"href":"https://github.com/ManageIQ/service_portal-api/pull/33#discussion_r228225084"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/33","id":225542378,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NTQyMzc4","html_url":"https://github.com/ManageIQ/service_portal-api/pull/33","diff_url":"https://github.com/ManageIQ/service_portal-api/pull/33.diff","patch_url":"https://github.com/ManageIQ/service_portal-api/pull/33.patch","issue_url":"https://api.github.com/repos/ManageIQ/service_portal-api/issues/33","number":33,"state":"open","locked":false,"title":"Copied name, description from a service offering","user":{"login":"syncrou","id":697347,"node_id":"MDQ6VXNlcjY5NzM0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/697347?v=4","gravatar_id":"","url":"https://api.github.com/users/syncrou","html_url":"https://github.com/syncrou","followers_url":"https://api.github.com/users/syncrou/followers","following_url":"https://api.github.com/users/syncrou/following{/other_user}","gists_url":"https://api.github.com/users/syncrou/gists{/gist_id}","starred_url":"https://api.github.com/users/syncrou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syncrou/subscriptions","organizations_url":"https://api.github.com/users/syncrou/orgs","repos_url":"https://api.github.com/users/syncrou/repos","events_url":"https://api.github.com/users/syncrou/events{/privacy}","received_events_url":"https://api.github.com/users/syncrou/received_events","type":"User","site_admin":false},"body":"Created a mechanism to build out parameters specific to the service they come from\r\nAdded a service_offering_ref to a portfolio_item on create","created_at":"2018-10-24T20:36:56Z","updated_at":"2018-10-25T15:59:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd824813b7911341203e6318c5e9ecdaa4d89a34","assignee":{"login":"gmcculloug","id":2591569,"node_id":"MDQ6VXNlcjI1OTE1Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/2591569?v=4","gravatar_id":"","url":"https://api.github.com/users/gmcculloug","html_url":"https://github.com/gmcculloug","followers_url":"https://api.github.com/users/gmcculloug/followers","following_url":"https://api.github.com/users/gmcculloug/following{/other_user}","gists_url":"https://api.github.com/users/gmcculloug/gists{/gist_id}","starred_url":"https://api.github.com/users/gmcculloug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmcculloug/subscriptions","organizations_url":"https://api.github.com/users/gmcculloug/orgs","repos_url":"https://api.github.com/users/gmcculloug/repos","events_url":"https://api.github.com/users/gmcculloug/events{/privacy}","received_events_url":"https://api.github.com/users/gmcculloug/received_events","type":"User","site_admin":false},"assignees":[{"login":"gmcculloug","id":2591569,"node_id":"MDQ6VXNlcjI1OTE1Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/2591569?v=4","gravatar_id":"","url":"https://api.github.com/users/gmcculloug","html_url":"https://github.com/gmcculloug","followers_url":"https://api.github.com/users/gmcculloug/followers","following_url":"https://api.github.com/users/gmcculloug/following{/other_user}","gists_url":"https://api.github.com/users/gmcculloug/gists{/gist_id}","starred_url":"https://api.github.com/users/gmcculloug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmcculloug/subscriptions","organizations_url":"https://api.github.com/users/gmcculloug/orgs","repos_url":"https://api.github.com/users/gmcculloug/repos","events_url":"https://api.github.com/users/gmcculloug/events{/privacy}","received_events_url":"https://api.github.com/users/gmcculloug/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1064006673,"node_id":"MDU6TGFiZWwxMDY0MDA2Njcz","url":"https://api.github.com/repos/ManageIQ/service_portal-api/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/33/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/33/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/service_portal-api/issues/33/comments","statuses_url":"https://api.github.com/repos/ManageIQ/service_portal-api/statuses/3f0ba14edcd944cc6319ebe4436cbc563bc06b0c","head":{"label":"syncrou:create_portfolio_item_from_service_offering","ref":"create_portfolio_item_from_service_offering","sha":"3f0ba14edcd944cc6319ebe4436cbc563bc06b0c","user":{"login":"syncrou","id":697347,"node_id":"MDQ6VXNlcjY5NzM0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/697347?v=4","gravatar_id":"","url":"https://api.github.com/users/syncrou","html_url":"https://github.com/syncrou","followers_url":"https://api.github.com/users/syncrou/followers","following_url":"https://api.github.com/users/syncrou/following{/other_user}","gists_url":"https://api.github.com/users/syncrou/gists{/gist_id}","starred_url":"https://api.github.com/users/syncrou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syncrou/subscriptions","organizations_url":"https://api.github.com/users/syncrou/orgs","repos_url":"https://api.github.com/users/syncrou/repos","events_url":"https://api.github.com/users/syncrou/events{/privacy}","received_events_url":"https://api.github.com/users/syncrou/received_events","type":"User","site_admin":false},"repo":{"id":149674689,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk2NzQ2ODk=","name":"service_portal-api","full_name":"syncrou/service_portal-api","private":false,"owner":{"login":"syncrou","id":697347,"node_id":"MDQ6VXNlcjY5NzM0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/697347?v=4","gravatar_id":"","url":"https://api.github.com/users/syncrou","html_url":"https://github.com/syncrou","followers_url":"https://api.github.com/users/syncrou/followers","following_url":"https://api.github.com/users/syncrou/following{/other_user}","gists_url":"https://api.github.com/users/syncrou/gists{/gist_id}","starred_url":"https://api.github.com/users/syncrou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syncrou/subscriptions","organizations_url":"https://api.github.com/users/syncrou/orgs","repos_url":"https://api.github.com/users/syncrou/repos","events_url":"https://api.github.com/users/syncrou/events{/privacy}","received_events_url":"https://api.github.com/users/syncrou/received_events","type":"User","site_admin":false},"html_url":"https://github.com/syncrou/service_portal-api","description":null,"fork":true,"url":"https://api.github.com/repos/syncrou/service_portal-api","forks_url":"https://api.github.com/repos/syncrou/service_portal-api/forks","keys_url":"https://api.github.com/repos/syncrou/service_portal-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/syncrou/service_portal-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/syncrou/service_portal-api/teams","hooks_url":"https://api.github.com/repos/syncrou/service_portal-api/hooks","issue_events_url":"https://api.github.com/repos/syncrou/service_portal-api/issues/events{/number}","events_url":"https://api.github.com/repos/syncrou/service_portal-api/events","assignees_url":"https://api.github.com/repos/syncrou/service_portal-api/assignees{/user}","branches_url":"https://api.github.com/repos/syncrou/service_portal-api/branches{/branch}","tags_url":"https://api.github.com/repos/syncrou/service_portal-api/tags","blobs_url":"https://api.github.com/repos/syncrou/service_portal-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/syncrou/service_portal-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/syncrou/service_portal-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/syncrou/service_portal-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/syncrou/service_portal-api/statuses/{sha}","languages_url":"https://api.github.com/repos/syncrou/service_portal-api/languages","stargazers_url":"https://api.github.com/repos/syncrou/service_portal-api/stargazers","contributors_url":"https://api.github.com/repos/syncrou/service_portal-api/contributors","subscribers_url":"https://api.github.com/repos/syncrou/service_portal-api/subscribers","subscription_url":"https://api.github.com/repos/syncrou/service_portal-api/subscription","commits_url":"https://api.github.com/repos/syncrou/service_portal-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/syncrou/service_portal-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/syncrou/service_portal-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/syncrou/service_portal-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/syncrou/service_portal-api/contents/{+path}","compare_url":"https://api.github.com/repos/syncrou/service_portal-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/syncrou/service_portal-api/merges","archive_url":"https://api.github.com/repos/syncrou/service_portal-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/syncrou/service_portal-api/downloads","issues_url":"https://api.github.com/repos/syncrou/service_portal-api/issues{/number}","pulls_url":"https://api.github.com/repos/syncrou/service_portal-api/pulls{/number}","milestones_url":"https://api.github.com/repos/syncrou/service_portal-api/milestones{/number}","notifications_url":"https://api.github.com/repos/syncrou/service_portal-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/syncrou/service_portal-api/labels{/name}","releases_url":"https://api.github.com/repos/syncrou/service_portal-api/releases{/id}","deployments_url":"https://api.github.com/repos/syncrou/service_portal-api/deployments","created_at":"2018-09-20T21:50:16Z","updated_at":"2018-10-25T13:47:27Z","pushed_at":"2018-10-25T15:43:56Z","git_url":"git://github.com/syncrou/service_portal-api.git","ssh_url":"git@github.com:syncrou/service_portal-api.git","clone_url":"https://github.com/syncrou/service_portal-api.git","svn_url":"https://github.com/syncrou/service_portal-api","homepage":null,"size":150,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"b6d3cf97aad7a41a7be0dc8771c8106ee91c66b3","user":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":149674149,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk2NzQxNDk=","name":"service_portal-api","full_name":"ManageIQ/service_portal-api","private":false,"owner":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ManageIQ/service_portal-api","description":null,"fork":false,"url":"https://api.github.com/repos/ManageIQ/service_portal-api","forks_url":"https://api.github.com/repos/ManageIQ/service_portal-api/forks","keys_url":"https://api.github.com/repos/ManageIQ/service_portal-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/service_portal-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/service_portal-api/teams","hooks_url":"https://api.github.com/repos/ManageIQ/service_portal-api/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/service_portal-api/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/service_portal-api/events","assignees_url":"https://api.github.com/repos/ManageIQ/service_portal-api/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/service_portal-api/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/service_portal-api/tags","blobs_url":"https://api.github.com/repos/ManageIQ/service_portal-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/service_portal-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/service_portal-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/service_portal-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/service_portal-api/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/service_portal-api/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/service_portal-api/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/service_portal-api/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/service_portal-api/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/service_portal-api/subscription","commits_url":"https://api.github.com/repos/ManageIQ/service_portal-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/service_portal-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/service_portal-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/service_portal-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/service_portal-api/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/service_portal-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/service_portal-api/merges","archive_url":"https://api.github.com/repos/ManageIQ/service_portal-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/service_portal-api/downloads","issues_url":"https://api.github.com/repos/ManageIQ/service_portal-api/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/service_portal-api/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/service_portal-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/service_portal-api/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/service_portal-api/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/service_portal-api/deployments","created_at":"2018-09-20T21:44:16Z","updated_at":"2018-10-25T10:47:52Z","pushed_at":"2018-10-25T15:43:57Z","git_url":"git://github.com/ManageIQ/service_portal-api.git","ssh_url":"git@github.com:ManageIQ/service_portal-api.git","clone_url":"https://github.com/ManageIQ/service_portal-api.git","svn_url":"https://github.com/ManageIQ/service_portal-api","homepage":null,"size":144,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":9,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/33"},"html":{"href":"https://github.com/ManageIQ/service_portal-api/pull/33"},"issue":{"href":"https://api.github.com/repos/ManageIQ/service_portal-api/issues/33"},"comments":{"href":"https://api.github.com/repos/ManageIQ/service_portal-api/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/service_portal-api/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/service_portal-api/statuses/3f0ba14edcd944cc6319ebe4436cbc563bc06b0c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"eclarizio"}}