{"action":"created","comment":{"url":"https://api.github.com/repos/adhearsion/electric_slide/pulls/comments/41505545","id":41505545,"diff_hunk":"@@ -336,4 +332,90 @@\n       end\n     end\n   end\n+\n+  describe '#update' do\n+    let(:queue) {\n+      ElectricSlide::CallQueue.new(\n+        agent_strategy: ElectricSlide::AgentStrategy::LongestIdle,\n+        connection_type: :call,\n+        agent_return_method: :auto\n+      )\n+    }\n+\n+    it 'updates all the given attributes' do\n+      strategy = double('Strategy').as_null_object\n+      queue.update(\n+        agent_strategy: strategy,\n+        connection_type: :bridge,\n+        agent_return_method: :manual\n+      )\n+      expect(queue.agent_strategy).to eq(strategy)\n+      expect(queue.connection_type).to eq(:bridge)\n+      expect(queue.agent_return_method).to eq(:manual)\n+    end\n+\n+    context 'when given an unrecognized attribute' do\n+      it 'does not raise an error' do\n+        expect{\n+          queue.update(foo: :bar)\n+        }.to_not raise_exception\n+      end\n+    end\n+\n+    context 'when given `nil`' do\n+      it 'does not raise an error' do\n+        expect{\n+          queue.update(foo: :bar)\n+        }.to_not raise_exception\n+      end\n+    end\n+  end\n+\n+  describe '#agent_strategy=' do\n+    let(:new_strategy_class) { double('New Strategy Class').as_null_object }\n+    let(:new_strategy_instance) { double('New Strategy Instance') }\n+    let(:agent) { double(ElectricSlide::Agent, id: '100', presence: :available).as_null_object }\n+\n+    before do\n+      allow(new_strategy_class).to receive(:new).and_return(new_strategy_instance)","path":"spec/electric_slide/call_queue_spec.rb","position":60,"original_position":60,"commit_id":"013f5d467b0af57167ff450eaebb501f70d2f3a9","original_commit_id":"013f5d467b0af57167ff450eaebb501f70d2f3a9","user":{"login":"neildecapia","id":18658,"avatar_url":"https://avatars.githubusercontent.com/u/18658?v=3","gravatar_id":"","url":"https://api.github.com/users/neildecapia","html_url":"https://github.com/neildecapia","followers_url":"https://api.github.com/users/neildecapia/followers","following_url":"https://api.github.com/users/neildecapia/following{/other_user}","gists_url":"https://api.github.com/users/neildecapia/gists{/gist_id}","starred_url":"https://api.github.com/users/neildecapia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neildecapia/subscriptions","organizations_url":"https://api.github.com/users/neildecapia/orgs","repos_url":"https://api.github.com/users/neildecapia/repos","events_url":"https://api.github.com/users/neildecapia/events{/privacy}","received_events_url":"https://api.github.com/users/neildecapia/received_events","type":"User","site_admin":false},"body":"I make a (rather contrived) test for checking if the the newly-set strategy is used [here](https://github.com/neildecapia/electric_slide/blob/feature/change-queue/spec/electric_slide/call_queue_spec.rb#L391-L392). So can I keep this as long as the strategy is a proper class? Or is there a better way to test that case?","created_at":"2015-10-08T12:18:14Z","updated_at":"2015-10-08T12:18:14Z","html_url":"https://github.com/adhearsion/electric_slide/pull/38#discussion_r41505545","pull_request_url":"https://api.github.com/repos/adhearsion/electric_slide/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/adhearsion/electric_slide/pulls/comments/41505545"},"html":{"href":"https://github.com/adhearsion/electric_slide/pull/38#discussion_r41505545"},"pull_request":{"href":"https://api.github.com/repos/adhearsion/electric_slide/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/adhearsion/electric_slide/pulls/38","id":47144111,"html_url":"https://github.com/adhearsion/electric_slide/pull/38","diff_url":"https://github.com/adhearsion/electric_slide/pull/38.diff","patch_url":"https://github.com/adhearsion/electric_slide/pull/38.patch","issue_url":"https://api.github.com/repos/adhearsion/electric_slide/issues/38","number":38,"state":"open","locked":false,"title":"Adding support for changing an existing queue's attributes","user":{"login":"neildecapia","id":18658,"avatar_url":"https://avatars.githubusercontent.com/u/18658?v=3","gravatar_id":"","url":"https://api.github.com/users/neildecapia","html_url":"https://github.com/neildecapia","followers_url":"https://api.github.com/users/neildecapia/followers","following_url":"https://api.github.com/users/neildecapia/following{/other_user}","gists_url":"https://api.github.com/users/neildecapia/gists{/gist_id}","starred_url":"https://api.github.com/users/neildecapia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neildecapia/subscriptions","organizations_url":"https://api.github.com/users/neildecapia/orgs","repos_url":"https://api.github.com/users/neildecapia/repos","events_url":"https://api.github.com/users/neildecapia/events{/privacy}","received_events_url":"https://api.github.com/users/neildecapia/received_events","type":"User","site_admin":false},"body":"Use `ElectricSlide::CallQueue#update` to change an existing queue's\r\nagent strategy, connection type and agent return method. When the agent\r\nstrategy is changed, the queue will \"initialize\" the new strategy by\r\nreturning queued agents into it.","created_at":"2015-10-08T12:06:01Z","updated_at":"2015-10-08T12:18:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a937a3ee1333c1f474bc0183c17458eb6cd2bb30","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/adhearsion/electric_slide/pulls/38/commits","review_comments_url":"https://api.github.com/repos/adhearsion/electric_slide/pulls/38/comments","review_comment_url":"https://api.github.com/repos/adhearsion/electric_slide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adhearsion/electric_slide/issues/38/comments","statuses_url":"https://api.github.com/repos/adhearsion/electric_slide/statuses/013f5d467b0af57167ff450eaebb501f70d2f3a9","head":{"label":"neildecapia:feature/change-queue","ref":"feature/change-queue","sha":"013f5d467b0af57167ff450eaebb501f70d2f3a9","user":{"login":"neildecapia","id":18658,"avatar_url":"https://avatars.githubusercontent.com/u/18658?v=3","gravatar_id":"","url":"https://api.github.com/users/neildecapia","html_url":"https://github.com/neildecapia","followers_url":"https://api.github.com/users/neildecapia/followers","following_url":"https://api.github.com/users/neildecapia/following{/other_user}","gists_url":"https://api.github.com/users/neildecapia/gists{/gist_id}","starred_url":"https://api.github.com/users/neildecapia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neildecapia/subscriptions","organizations_url":"https://api.github.com/users/neildecapia/orgs","repos_url":"https://api.github.com/users/neildecapia/repos","events_url":"https://api.github.com/users/neildecapia/events{/privacy}","received_events_url":"https://api.github.com/users/neildecapia/received_events","type":"User","site_admin":false},"repo":{"id":40293542,"name":"electric_slide","full_name":"neildecapia/electric_slide","owner":{"login":"neildecapia","id":18658,"avatar_url":"https://avatars.githubusercontent.com/u/18658?v=3","gravatar_id":"","url":"https://api.github.com/users/neildecapia","html_url":"https://github.com/neildecapia","followers_url":"https://api.github.com/users/neildecapia/followers","following_url":"https://api.github.com/users/neildecapia/following{/other_user}","gists_url":"https://api.github.com/users/neildecapia/gists{/gist_id}","starred_url":"https://api.github.com/users/neildecapia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neildecapia/subscriptions","organizations_url":"https://api.github.com/users/neildecapia/orgs","repos_url":"https://api.github.com/users/neildecapia/repos","events_url":"https://api.github.com/users/neildecapia/events{/privacy}","received_events_url":"https://api.github.com/users/neildecapia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neildecapia/electric_slide","description":"Adhearsion plugin implementing generic call queueing algorithms","fork":true,"url":"https://api.github.com/repos/neildecapia/electric_slide","forks_url":"https://api.github.com/repos/neildecapia/electric_slide/forks","keys_url":"https://api.github.com/repos/neildecapia/electric_slide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neildecapia/electric_slide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neildecapia/electric_slide/teams","hooks_url":"https://api.github.com/repos/neildecapia/electric_slide/hooks","issue_events_url":"https://api.github.com/repos/neildecapia/electric_slide/issues/events{/number}","events_url":"https://api.github.com/repos/neildecapia/electric_slide/events","assignees_url":"https://api.github.com/repos/neildecapia/electric_slide/assignees{/user}","branches_url":"https://api.github.com/repos/neildecapia/electric_slide/branches{/branch}","tags_url":"https://api.github.com/repos/neildecapia/electric_slide/tags","blobs_url":"https://api.github.com/repos/neildecapia/electric_slide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neildecapia/electric_slide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neildecapia/electric_slide/git/refs{/sha}","trees_url":"https://api.github.com/repos/neildecapia/electric_slide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neildecapia/electric_slide/statuses/{sha}","languages_url":"https://api.github.com/repos/neildecapia/electric_slide/languages","stargazers_url":"https://api.github.com/repos/neildecapia/electric_slide/stargazers","contributors_url":"https://api.github.com/repos/neildecapia/electric_slide/contributors","subscribers_url":"https://api.github.com/repos/neildecapia/electric_slide/subscribers","subscription_url":"https://api.github.com/repos/neildecapia/electric_slide/subscription","commits_url":"https://api.github.com/repos/neildecapia/electric_slide/commits{/sha}","git_commits_url":"https://api.github.com/repos/neildecapia/electric_slide/git/commits{/sha}","comments_url":"https://api.github.com/repos/neildecapia/electric_slide/comments{/number}","issue_comment_url":"https://api.github.com/repos/neildecapia/electric_slide/issues/comments{/number}","contents_url":"https://api.github.com/repos/neildecapia/electric_slide/contents/{+path}","compare_url":"https://api.github.com/repos/neildecapia/electric_slide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neildecapia/electric_slide/merges","archive_url":"https://api.github.com/repos/neildecapia/electric_slide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neildecapia/electric_slide/downloads","issues_url":"https://api.github.com/repos/neildecapia/electric_slide/issues{/number}","pulls_url":"https://api.github.com/repos/neildecapia/electric_slide/pulls{/number}","milestones_url":"https://api.github.com/repos/neildecapia/electric_slide/milestones{/number}","notifications_url":"https://api.github.com/repos/neildecapia/electric_slide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neildecapia/electric_slide/labels{/name}","releases_url":"https://api.github.com/repos/neildecapia/electric_slide/releases{/id}","created_at":"2015-08-06T08:24:28Z","updated_at":"2015-08-06T08:24:29Z","pushed_at":"2015-10-08T12:05:16Z","git_url":"git://github.com/neildecapia/electric_slide.git","ssh_url":"git@github.com:neildecapia/electric_slide.git","clone_url":"https://github.com/neildecapia/electric_slide.git","svn_url":"https://github.com/neildecapia/electric_slide","homepage":"","size":210,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"develop"}},"base":{"label":"adhearsion:develop","ref":"develop","sha":"07d0280ce922c310bb9d2c7e21fefaede7d232ab","user":{"login":"adhearsion","id":42552,"avatar_url":"https://avatars.githubusercontent.com/u/42552?v=3","gravatar_id":"","url":"https://api.github.com/users/adhearsion","html_url":"https://github.com/adhearsion","followers_url":"https://api.github.com/users/adhearsion/followers","following_url":"https://api.github.com/users/adhearsion/following{/other_user}","gists_url":"https://api.github.com/users/adhearsion/gists{/gist_id}","starred_url":"https://api.github.com/users/adhearsion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adhearsion/subscriptions","organizations_url":"https://api.github.com/users/adhearsion/orgs","repos_url":"https://api.github.com/users/adhearsion/repos","events_url":"https://api.github.com/users/adhearsion/events{/privacy}","received_events_url":"https://api.github.com/users/adhearsion/received_events","type":"Organization","site_admin":false},"repo":{"id":2578029,"name":"electric_slide","full_name":"adhearsion/electric_slide","owner":{"login":"adhearsion","id":42552,"avatar_url":"https://avatars.githubusercontent.com/u/42552?v=3","gravatar_id":"","url":"https://api.github.com/users/adhearsion","html_url":"https://github.com/adhearsion","followers_url":"https://api.github.com/users/adhearsion/followers","following_url":"https://api.github.com/users/adhearsion/following{/other_user}","gists_url":"https://api.github.com/users/adhearsion/gists{/gist_id}","starred_url":"https://api.github.com/users/adhearsion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adhearsion/subscriptions","organizations_url":"https://api.github.com/users/adhearsion/orgs","repos_url":"https://api.github.com/users/adhearsion/repos","events_url":"https://api.github.com/users/adhearsion/events{/privacy}","received_events_url":"https://api.github.com/users/adhearsion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adhearsion/electric_slide","description":"Adhearsion plugin implementing generic call queueing algorithms","fork":false,"url":"https://api.github.com/repos/adhearsion/electric_slide","forks_url":"https://api.github.com/repos/adhearsion/electric_slide/forks","keys_url":"https://api.github.com/repos/adhearsion/electric_slide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adhearsion/electric_slide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adhearsion/electric_slide/teams","hooks_url":"https://api.github.com/repos/adhearsion/electric_slide/hooks","issue_events_url":"https://api.github.com/repos/adhearsion/electric_slide/issues/events{/number}","events_url":"https://api.github.com/repos/adhearsion/electric_slide/events","assignees_url":"https://api.github.com/repos/adhearsion/electric_slide/assignees{/user}","branches_url":"https://api.github.com/repos/adhearsion/electric_slide/branches{/branch}","tags_url":"https://api.github.com/repos/adhearsion/electric_slide/tags","blobs_url":"https://api.github.com/repos/adhearsion/electric_slide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adhearsion/electric_slide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adhearsion/electric_slide/git/refs{/sha}","trees_url":"https://api.github.com/repos/adhearsion/electric_slide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adhearsion/electric_slide/statuses/{sha}","languages_url":"https://api.github.com/repos/adhearsion/electric_slide/languages","stargazers_url":"https://api.github.com/repos/adhearsion/electric_slide/stargazers","contributors_url":"https://api.github.com/repos/adhearsion/electric_slide/contributors","subscribers_url":"https://api.github.com/repos/adhearsion/electric_slide/subscribers","subscription_url":"https://api.github.com/repos/adhearsion/electric_slide/subscription","commits_url":"https://api.github.com/repos/adhearsion/electric_slide/commits{/sha}","git_commits_url":"https://api.github.com/repos/adhearsion/electric_slide/git/commits{/sha}","comments_url":"https://api.github.com/repos/adhearsion/electric_slide/comments{/number}","issue_comment_url":"https://api.github.com/repos/adhearsion/electric_slide/issues/comments{/number}","contents_url":"https://api.github.com/repos/adhearsion/electric_slide/contents/{+path}","compare_url":"https://api.github.com/repos/adhearsion/electric_slide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adhearsion/electric_slide/merges","archive_url":"https://api.github.com/repos/adhearsion/electric_slide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adhearsion/electric_slide/downloads","issues_url":"https://api.github.com/repos/adhearsion/electric_slide/issues{/number}","pulls_url":"https://api.github.com/repos/adhearsion/electric_slide/pulls{/number}","milestones_url":"https://api.github.com/repos/adhearsion/electric_slide/milestones{/number}","notifications_url":"https://api.github.com/repos/adhearsion/electric_slide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adhearsion/electric_slide/labels{/name}","releases_url":"https://api.github.com/repos/adhearsion/electric_slide/releases{/id}","created_at":"2011-10-14T18:40:03Z","updated_at":"2015-09-09T15:23:42Z","pushed_at":"2015-10-08T12:06:01Z","git_url":"git://github.com/adhearsion/electric_slide.git","ssh_url":"git@github.com:adhearsion/electric_slide.git","clone_url":"https://github.com/adhearsion/electric_slide.git","svn_url":"https://github.com/adhearsion/electric_slide","homepage":"","size":733,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/adhearsion/electric_slide/pulls/38"},"html":{"href":"https://github.com/adhearsion/electric_slide/pull/38"},"issue":{"href":"https://api.github.com/repos/adhearsion/electric_slide/issues/38"},"comments":{"href":"https://api.github.com/repos/adhearsion/electric_slide/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/adhearsion/electric_slide/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/adhearsion/electric_slide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adhearsion/electric_slide/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/adhearsion/electric_slide/statuses/013f5d467b0af57167ff450eaebb501f70d2f3a9"}}}}