{"action":"created","comment":{"url":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/comments/56667710","id":56667710,"diff_hunk":"@@ -42,5 +39,37 @@ test( 'CHANGE_CONTENT changes the field', function ( t ) {\n \tdeepFreeze( stateBefore );\n \tt.deepEqual( formContent( stateBefore, action ), expectedState );\n \tt.end();\n+} );\n+\n+test( 'CHANGE_CONTENT throws an error if the field name is not allowed', function ( t ) {\n+\tvar action = { type: 'CHANGE_CONTENT', payload: { value: 'supercalifragilistic', contentName: 'unknownField' } };\n \n+\tt.throws( function () {\n+\t\tformContent( {}, action );\n+\t} );\n+\tt.end();\n } );\n+\n+test( 'INITIALIZE_CONTENT changes multiple fields', function ( t ) {\n+\tvar stateBefore = { paymentType: 'PPL', amount: 0, recurringPayment: 0 },\n+\t\texpectedState = { paymentType: 'BEZ', amount: '25,00', recurringPayment: 0 },\n+\t\taction = { type: 'INITIALIZE_CONTENT', payload: { amount: '25,00', paymentType: 'BEZ' } };\n+\n+\tdeepFreeze( stateBefore );","path":"app/js/tests/reducers/test_form_content.js","position":44,"original_position":44,"commit_id":"8f0d209c2c99bb195be4bfc494cc643622037855","original_commit_id":"8f0d209c2c99bb195be4bfc494cc643622037855","user":{"login":"gbirke","id":223326,"avatar_url":"https://avatars.githubusercontent.com/u/223326?v=3","gravatar_id":"","url":"https://api.github.com/users/gbirke","html_url":"https://github.com/gbirke","followers_url":"https://api.github.com/users/gbirke/followers","following_url":"https://api.github.com/users/gbirke/following{/other_user}","gists_url":"https://api.github.com/users/gbirke/gists{/gist_id}","starred_url":"https://api.github.com/users/gbirke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbirke/subscriptions","organizations_url":"https://api.github.com/users/gbirke/orgs","repos_url":"https://api.github.com/users/gbirke/repos","events_url":"https://api.github.com/users/gbirke/events{/privacy}","received_events_url":"https://api.github.com/users/gbirke/received_events","type":"User","site_admin":false},"body":"To assert that the state is immutable. If the state is somehow changed in the reducer (instead of creating a new state object), the deep frozen object will throw an exception.","created_at":"2016-03-18T14:54:36Z","updated_at":"2016-03-18T14:54:36Z","html_url":"https://github.com/wmde/FundraisingFrontend/pull/261#discussion_r56667710","pull_request_url":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/261","_links":{"self":{"href":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/comments/56667710"},"html":{"href":"https://github.com/wmde/FundraisingFrontend/pull/261#discussion_r56667710"},"pull_request":{"href":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/261"}}},"pull_request":{"url":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/261","id":62581010,"html_url":"https://github.com/wmde/FundraisingFrontend/pull/261","diff_url":"https://github.com/wmde/FundraisingFrontend/pull/261.diff","patch_url":"https://github.com/wmde/FundraisingFrontend/pull/261.patch","issue_url":"https://api.github.com/repos/wmde/FundraisingFrontend/issues/261","number":261,"state":"closed","locked":false,"title":"Initial form state","user":{"login":"gbirke","id":223326,"avatar_url":"https://avatars.githubusercontent.com/u/223326?v=3","gravatar_id":"","url":"https://api.github.com/users/gbirke","html_url":"https://github.com/gbirke","followers_url":"https://api.github.com/users/gbirke/followers","following_url":"https://api.github.com/users/gbirke/following{/other_user}","gists_url":"https://api.github.com/users/gbirke/gists{/gist_id}","starred_url":"https://api.github.com/users/gbirke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbirke/subscriptions","organizations_url":"https://api.github.com/users/gbirke/orgs","repos_url":"https://api.github.com/users/gbirke/repos","events_url":"https://api.github.com/users/gbirke/events{/privacy}","received_events_url":"https://api.github.com/users/gbirke/received_events","type":"User","site_admin":false},"body":"It's now possible to initialize the form values with initial values\r\n(which will be generated by the backend in a future commit).\r\n\r\nImproved validation code to for easier handling of initial state.\r\nValidation needs to know about initial state to allow for invalid values\r\nas initial state (e.g. empty fields).\r\n\r\nThis is one step for task https://phabricator.wikimedia.org/T129227","created_at":"2016-03-11T18:11:45Z","updated_at":"2016-03-18T14:54:36Z","closed_at":"2016-03-18T14:09:37Z","merged_at":"2016-03-18T14:09:37Z","merge_commit_sha":"753bc7b5b8feb40547c19cfd64fdd578add33b1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/261/commits","review_comments_url":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/261/comments","review_comment_url":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wmde/FundraisingFrontend/issues/261/comments","statuses_url":"https://api.github.com/repos/wmde/FundraisingFrontend/statuses/8f0d209c2c99bb195be4bfc494cc643622037855","head":{"label":"wmde:initial-form-state","ref":"initial-form-state","sha":"8f0d209c2c99bb195be4bfc494cc643622037855","user":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"repo":{"id":42872217,"name":"FundraisingFrontend","full_name":"wmde/FundraisingFrontend","owner":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wmde/FundraisingFrontend","description":"Fundraising Frontend backend code v2 alpha","fork":false,"url":"https://api.github.com/repos/wmde/FundraisingFrontend","forks_url":"https://api.github.com/repos/wmde/FundraisingFrontend/forks","keys_url":"https://api.github.com/repos/wmde/FundraisingFrontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmde/FundraisingFrontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmde/FundraisingFrontend/teams","hooks_url":"https://api.github.com/repos/wmde/FundraisingFrontend/hooks","issue_events_url":"https://api.github.com/repos/wmde/FundraisingFrontend/issues/events{/number}","events_url":"https://api.github.com/repos/wmde/FundraisingFrontend/events","assignees_url":"https://api.github.com/repos/wmde/FundraisingFrontend/assignees{/user}","branches_url":"https://api.github.com/repos/wmde/FundraisingFrontend/branches{/branch}","tags_url":"https://api.github.com/repos/wmde/FundraisingFrontend/tags","blobs_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmde/FundraisingFrontend/statuses/{sha}","languages_url":"https://api.github.com/repos/wmde/FundraisingFrontend/languages","stargazers_url":"https://api.github.com/repos/wmde/FundraisingFrontend/stargazers","contributors_url":"https://api.github.com/repos/wmde/FundraisingFrontend/contributors","subscribers_url":"https://api.github.com/repos/wmde/FundraisingFrontend/subscribers","subscription_url":"https://api.github.com/repos/wmde/FundraisingFrontend/subscription","commits_url":"https://api.github.com/repos/wmde/FundraisingFrontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmde/FundraisingFrontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmde/FundraisingFrontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmde/FundraisingFrontend/contents/{+path}","compare_url":"https://api.github.com/repos/wmde/FundraisingFrontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmde/FundraisingFrontend/merges","archive_url":"https://api.github.com/repos/wmde/FundraisingFrontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmde/FundraisingFrontend/downloads","issues_url":"https://api.github.com/repos/wmde/FundraisingFrontend/issues{/number}","pulls_url":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls{/number}","milestones_url":"https://api.github.com/repos/wmde/FundraisingFrontend/milestones{/number}","notifications_url":"https://api.github.com/repos/wmde/FundraisingFrontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmde/FundraisingFrontend/labels{/name}","releases_url":"https://api.github.com/repos/wmde/FundraisingFrontend/releases{/id}","deployments_url":"https://api.github.com/repos/wmde/FundraisingFrontend/deployments","created_at":"2015-09-21T14:42:43Z","updated_at":"2016-01-29T13:01:30Z","pushed_at":"2016-03-18T14:41:12Z","git_url":"git://github.com/wmde/FundraisingFrontend.git","ssh_url":"git@github.com:wmde/FundraisingFrontend.git","clone_url":"https://github.com/wmde/FundraisingFrontend.git","svn_url":"https://github.com/wmde/FundraisingFrontend","homepage":"","size":1282,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"wmde:master","ref":"master","sha":"dc0930ee620168f94ae785ac0bd362f60245d96d","user":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"repo":{"id":42872217,"name":"FundraisingFrontend","full_name":"wmde/FundraisingFrontend","owner":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wmde/FundraisingFrontend","description":"Fundraising Frontend backend code v2 alpha","fork":false,"url":"https://api.github.com/repos/wmde/FundraisingFrontend","forks_url":"https://api.github.com/repos/wmde/FundraisingFrontend/forks","keys_url":"https://api.github.com/repos/wmde/FundraisingFrontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmde/FundraisingFrontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmde/FundraisingFrontend/teams","hooks_url":"https://api.github.com/repos/wmde/FundraisingFrontend/hooks","issue_events_url":"https://api.github.com/repos/wmde/FundraisingFrontend/issues/events{/number}","events_url":"https://api.github.com/repos/wmde/FundraisingFrontend/events","assignees_url":"https://api.github.com/repos/wmde/FundraisingFrontend/assignees{/user}","branches_url":"https://api.github.com/repos/wmde/FundraisingFrontend/branches{/branch}","tags_url":"https://api.github.com/repos/wmde/FundraisingFrontend/tags","blobs_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmde/FundraisingFrontend/statuses/{sha}","languages_url":"https://api.github.com/repos/wmde/FundraisingFrontend/languages","stargazers_url":"https://api.github.com/repos/wmde/FundraisingFrontend/stargazers","contributors_url":"https://api.github.com/repos/wmde/FundraisingFrontend/contributors","subscribers_url":"https://api.github.com/repos/wmde/FundraisingFrontend/subscribers","subscription_url":"https://api.github.com/repos/wmde/FundraisingFrontend/subscription","commits_url":"https://api.github.com/repos/wmde/FundraisingFrontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmde/FundraisingFrontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmde/FundraisingFrontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmde/FundraisingFrontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmde/FundraisingFrontend/contents/{+path}","compare_url":"https://api.github.com/repos/wmde/FundraisingFrontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmde/FundraisingFrontend/merges","archive_url":"https://api.github.com/repos/wmde/FundraisingFrontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmde/FundraisingFrontend/downloads","issues_url":"https://api.github.com/repos/wmde/FundraisingFrontend/issues{/number}","pulls_url":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls{/number}","milestones_url":"https://api.github.com/repos/wmde/FundraisingFrontend/milestones{/number}","notifications_url":"https://api.github.com/repos/wmde/FundraisingFrontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmde/FundraisingFrontend/labels{/name}","releases_url":"https://api.github.com/repos/wmde/FundraisingFrontend/releases{/id}","deployments_url":"https://api.github.com/repos/wmde/FundraisingFrontend/deployments","created_at":"2015-09-21T14:42:43Z","updated_at":"2016-01-29T13:01:30Z","pushed_at":"2016-03-18T14:41:12Z","git_url":"git://github.com/wmde/FundraisingFrontend.git","ssh_url":"git@github.com:wmde/FundraisingFrontend.git","clone_url":"https://github.com/wmde/FundraisingFrontend.git","svn_url":"https://github.com/wmde/FundraisingFrontend","homepage":"","size":1282,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/261"},"html":{"href":"https://github.com/wmde/FundraisingFrontend/pull/261"},"issue":{"href":"https://api.github.com/repos/wmde/FundraisingFrontend/issues/261"},"comments":{"href":"https://api.github.com/repos/wmde/FundraisingFrontend/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wmde/FundraisingFrontend/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/wmde/FundraisingFrontend/statuses/8f0d209c2c99bb195be4bfc494cc643622037855"}}}}