{"action":"created","issue":{"url":"https://api.github.com/repos/testdouble/present/issues/90","labels_url":"https://api.github.com/repos/testdouble/present/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/testdouble/present/issues/90/comments","events_url":"https://api.github.com/repos/testdouble/present/issues/90/events","html_url":"https://github.com/testdouble/present/pull/90","id":89293476,"number":90,"title":"starting a characterization test","user":{"login":"searls","id":79303,"avatar_url":"https://avatars.githubusercontent.com/u/79303?v=3","gravatar_id":"","url":"https://api.github.com/users/searls","html_url":"https://github.com/searls","followers_url":"https://api.github.com/users/searls/followers","following_url":"https://api.github.com/users/searls/following{/other_user}","gists_url":"https://api.github.com/users/searls/gists{/gist_id}","starred_url":"https://api.github.com/users/searls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/searls/subscriptions","organizations_url":"https://api.github.com/users/searls/orgs","repos_url":"https://api.github.com/users/searls/repos","events_url":"https://api.github.com/users/searls/events{/privacy}","received_events_url":"https://api.github.com/users/searls/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/testdouble/present/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-18T13:27:23Z","updated_at":"2015-06-21T00:09:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/testdouble/present/pulls/90","html_url":"https://github.com/testdouble/present/pull/90","diff_url":"https://github.com/testdouble/present/pull/90.diff","patch_url":"https://github.com/testdouble/present/pull/90.patch"},"body":"NOT READY TO MERGE"},"comment":{"url":"https://api.github.com/repos/testdouble/present/issues/comments/113844002","html_url":"https://github.com/testdouble/present/pull/90#issuecomment-113844002","issue_url":"https://api.github.com/repos/testdouble/present/issues/90","id":113844002,"user":{"login":"ngauthier","id":13654,"avatar_url":"https://avatars.githubusercontent.com/u/13654?v=3","gravatar_id":"","url":"https://api.github.com/users/ngauthier","html_url":"https://github.com/ngauthier","followers_url":"https://api.github.com/users/ngauthier/followers","following_url":"https://api.github.com/users/ngauthier/following{/other_user}","gists_url":"https://api.github.com/users/ngauthier/gists{/gist_id}","starred_url":"https://api.github.com/users/ngauthier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngauthier/subscriptions","organizations_url":"https://api.github.com/users/ngauthier/orgs","repos_url":"https://api.github.com/users/ngauthier/repos","events_url":"https://api.github.com/users/ngauthier/events{/privacy}","received_events_url":"https://api.github.com/users/ngauthier/received_events","type":"User","site_admin":false},"created_at":"2015-06-21T00:09:04Z","updated_at":"2015-06-21T00:09:04Z","body":"Entry.day is an integer column in the DB. Fixtures bypass the models, so it is trying to insert a string to an int field:\r\n\r\n```\r\n  Fixture Insert (0.2ms)  INSERT INTO \"entries\" (\"day\", \"presence\", \"created_at\", \"updated_at\", \"id\", \"projects_timesheet_id\", \"location_id\") VALUES (0, 0, '2015-06-21 00:07:40', '2015-06-21 00:07:40', 973644392, 291880915, 125610863)\r\n  Fixture Insert (0.5ms)  INSERT INTO \"entries\" (\"day\", \"presence\", \"created_at\", \"updated_at\", \"id\", \"projects_timesheet_id\", \"location_id\") VALUES (0, 0, '2015-06-21 00:07:40', '2015-06-21 00:07:40', 696536752, 291880915, 125610863)\r\n```\r\n\r\nNote that day is 0 in both cases. It's like pg is doing `\"monday\".to_i => 0`, `\"tuesday\".to_i => 0`. So, you have to look up the enum, like this, in the fixture:\r\n\r\n```yaml\r\n  day: <%= Entry.days[day_name] %>\r\n```\r\n\r\n\r\n:sparkles: :heart: :sparkles: :heart: :sparkles: :heart: :sparkles: :heart: :sparkles: :heart: :sparkles: :heart: :sparkles: \r\n\r\n@ngauthier"}}