{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/988","repository_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers","labels_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/988/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/988/comments","events_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/988/events","html_url":"https://github.com/thoughtbot/shoulda-matchers/issues/988","id":199186779,"number":988,"title":"with_options on have_db_column_matcher should not ignore incorrect options","user":{"login":"pirj","id":6916,"avatar_url":"https://avatars.githubusercontent.com/u/6916?v=3","gravatar_id":"","url":"https://api.github.com/users/pirj","html_url":"https://github.com/pirj","followers_url":"https://api.github.com/users/pirj/followers","following_url":"https://api.github.com/users/pirj/following{/other_user}","gists_url":"https://api.github.com/users/pirj/gists{/gist_id}","starred_url":"https://api.github.com/users/pirj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirj/subscriptions","organizations_url":"https://api.github.com/users/pirj/orgs","repos_url":"https://api.github.com/users/pirj/repos","events_url":"https://api.github.com/users/pirj/events{/privacy}","received_events_url":"https://api.github.com/users/pirj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-06T12:29:16Z","updated_at":"2017-01-07T08:21:14Z","closed_at":null,"body":"E.g.\r\n\r\n```\r\n      is_expected.to have_db_column(:status).\r\n        with_options(default: 0, nullable: false)\r\n```\r\n\r\nHave you spotted the error?\r\nIdea is to fail the test when an option passed is not amongst available options."},"comment":{"url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/comments/271070492","html_url":"https://github.com/thoughtbot/shoulda-matchers/issues/988#issuecomment-271070492","issue_url":"https://api.github.com/repos/thoughtbot/shoulda-matchers/issues/988","id":271070492,"user":{"login":"pirj","id":6916,"avatar_url":"https://avatars.githubusercontent.com/u/6916?v=3","gravatar_id":"","url":"https://api.github.com/users/pirj","html_url":"https://github.com/pirj","followers_url":"https://api.github.com/users/pirj/followers","following_url":"https://api.github.com/users/pirj/following{/other_user}","gists_url":"https://api.github.com/users/pirj/gists{/gist_id}","starred_url":"https://api.github.com/users/pirj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirj/subscriptions","organizations_url":"https://api.github.com/users/pirj/orgs","repos_url":"https://api.github.com/users/pirj/repos","events_url":"https://api.github.com/users/pirj/events{/privacy}","received_events_url":"https://api.github.com/users/pirj/received_events","type":"User","site_admin":false},"created_at":"2017-01-07T08:21:14Z","updated_at":"2017-01-07T08:21:14Z","body":"@mcmire A single row (ok, few rows with `with_options`) is a concise way to describe model attribute expectations. Tests on default creation are factory tests and are prone to false positives if someone changes the factory to set column to default value (in the example above `status` to 0), even if DB default is `null`, and tests using factories will pass while it will be blowing up when creating real records."}}
{"actor":{"display_login":"pirj"}}