{"action":"created","issue":{"url":"https://api.github.com/repos/gocardless/rspec-activejob/issues/10","labels_url":"https://api.github.com/repos/gocardless/rspec-activejob/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/gocardless/rspec-activejob/issues/10/comments","events_url":"https://api.github.com/repos/gocardless/rspec-activejob/issues/10/events","html_url":"https://github.com/gocardless/rspec-activejob/issues/10","id":73390923,"number":10,"title":"Expected to enqueue with global_id not working properly?","user":{"login":"jakecraige","id":3799709,"avatar_url":"https://avatars.githubusercontent.com/u/3799709?v=3","gravatar_id":"","url":"https://api.github.com/users/jakecraige","html_url":"https://github.com/jakecraige","followers_url":"https://api.github.com/users/jakecraige/followers","following_url":"https://api.github.com/users/jakecraige/following{/other_user}","gists_url":"https://api.github.com/users/jakecraige/gists{/gist_id}","starred_url":"https://api.github.com/users/jakecraige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakecraige/subscriptions","organizations_url":"https://api.github.com/users/jakecraige/orgs","repos_url":"https://api.github.com/users/jakecraige/repos","events_url":"https://api.github.com/users/jakecraige/events{/privacy}","received_events_url":"https://api.github.com/users/jakecraige/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-05T18:26:57Z","updated_at":"2015-05-05T18:32:08Z","closed_at":null,"body":"I have a test that looks like this:\r\n\r\n```ruby\r\n      app = create(:loan_application)\r\n      params = {\r\n        loan_application: attributes_for(:loan_application, :loan_details)\r\n      }\r\n\r\n      expect { put :update, params }.\r\n        to enqueue_a(PublishLoanApplicationJob).with(global_id(app))\r\n```\r\n\r\nWhen I run it, I get this exception:\r\n\r\n```\r\nexpected to enqueue a PublishLoanApplicationJob with [#<RSpec::ActiveJob::Matchers::GlobalID:0x007fdd674ac828 @expected=#<LoanApplication id: 286, ...l>>], but enqueued with [{\"_aj_globalid\"=>\"gid://app/LoanApplication/287\"}]\r\n```\r\n\r\nWhat am I doing wrong? \r\n\r\nUsing Rails 4.2.1 and ActiveJob 4.2.1"},"comment":{"url":"https://api.github.com/repos/gocardless/rspec-activejob/issues/comments/99170959","html_url":"https://github.com/gocardless/rspec-activejob/issues/10#issuecomment-99170959","issue_url":"https://api.github.com/repos/gocardless/rspec-activejob/issues/10","id":99170959,"user":{"login":"jakecraige","id":3799709,"avatar_url":"https://avatars.githubusercontent.com/u/3799709?v=3","gravatar_id":"","url":"https://api.github.com/users/jakecraige","html_url":"https://github.com/jakecraige","followers_url":"https://api.github.com/users/jakecraige/followers","following_url":"https://api.github.com/users/jakecraige/following{/other_user}","gists_url":"https://api.github.com/users/jakecraige/gists{/gist_id}","starred_url":"https://api.github.com/users/jakecraige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakecraige/subscriptions","organizations_url":"https://api.github.com/users/jakecraige/orgs","repos_url":"https://api.github.com/users/jakecraige/repos","events_url":"https://api.github.com/users/jakecraige/events{/privacy}","received_events_url":"https://api.github.com/users/jakecraige/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T18:32:08Z","updated_at":"2015-05-05T18:32:08Z","body":"Yeah I just caught that. My bad. Thanks for the quick response.\r\n\r\nI guess my recommendation now would be to make the error more clear what's wrong :) I think the `RSpec::ActiveJob::Matchers::GlobalID`.. part was throwing me off. "}}