{"action":"created","comment":{"url":"https://api.github.com/repos/openSUSE/osem/pulls/comments/74023672","id":74023672,"diff_hunk":"@@ -0,0 +1,143 @@\n+require 'spec_helper'\n+\n+describe Admin::EventSchedulesController do\n+  let(:venue) { create(:venue) }\n+  let(:conference) { create(:conference, venue: venue) }\n+  let(:schedule) { create(:schedule, program: conference.program)}\n+  let(:event_schedule) { create(:event_schedule, schedule: schedule)}\n+  let!(:organizer_role) { Role.find_by(name: 'organizer', resource: conference) }\n+  let(:organizer) { create(:user, role_ids: organizer_role.id) }\n+\n+  context 'logged in as an organizer' do\n+    before :each do\n+      sign_in(organizer)\n+      event_schedule\n+    end\n+\n+    describe 'POST #create' do\n+      context 'with valid attributes' do\n+        it 'saves the event schedule to the database' do\n+          expected = expect do\n+            post :create, conference_id: conference.short_title, event_schedule:\n+                 attributes_for(:event_schedule,\n+                                schedule_id: schedule.id,\n+                                event_id: create(:event, program: conference.program).id,","path":"spec/controllers/admin/event_schedules_controller_spec.rb","position":24,"original_position":24,"commit_id":"2ae99232af47d67abbadaa051dd4e286abef279d","original_commit_id":"2ae99232af47d67abbadaa051dd4e286abef279d","user":{"login":"ChrisBr","id":3799140,"avatar_url":"https://avatars.githubusercontent.com/u/3799140?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisBr","html_url":"https://github.com/ChrisBr","followers_url":"https://api.github.com/users/ChrisBr/followers","following_url":"https://api.github.com/users/ChrisBr/following{/other_user}","gists_url":"https://api.github.com/users/ChrisBr/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisBr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisBr/subscriptions","organizations_url":"https://api.github.com/users/ChrisBr/orgs","repos_url":"https://api.github.com/users/ChrisBr/repos","events_url":"https://api.github.com/users/ChrisBr/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisBr/received_events","type":"User","site_admin":false},"body":"Why do you create a new one and don't use the factories you already defined?","created_at":"2016-08-09T09:10:18Z","updated_at":"2016-08-09T09:10:18Z","html_url":"https://github.com/openSUSE/osem/pull/1094#discussion_r74023672","pull_request_url":"https://api.github.com/repos/openSUSE/osem/pulls/1094","_links":{"self":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/comments/74023672"},"html":{"href":"https://github.com/openSUSE/osem/pull/1094#discussion_r74023672"},"pull_request":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/1094"}}},"pull_request":{"url":"https://api.github.com/repos/openSUSE/osem/pulls/1094","id":76744778,"html_url":"https://github.com/openSUSE/osem/pull/1094","diff_url":"https://github.com/openSUSE/osem/pull/1094.diff","patch_url":"https://github.com/openSUSE/osem/pull/1094.patch","issue_url":"https://api.github.com/repos/openSUSE/osem/issues/1094","number":1094,"state":"open","locked":false,"title":"Schedule versioning","user":{"login":"Ana06","id":16052290,"avatar_url":"https://avatars.githubusercontent.com/u/16052290?v=3","gravatar_id":"","url":"https://api.github.com/users/Ana06","html_url":"https://github.com/Ana06","followers_url":"https://api.github.com/users/Ana06/followers","following_url":"https://api.github.com/users/Ana06/following{/other_user}","gists_url":"https://api.github.com/users/Ana06/gists{/gist_id}","starred_url":"https://api.github.com/users/Ana06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ana06/subscriptions","organizations_url":"https://api.github.com/users/Ana06/orgs","repos_url":"https://api.github.com/users/Ana06/repos","events_url":"https://api.github.com/users/Ana06/events{/privacy}","received_events_url":"https://api.github.com/users/Ana06/received_events","type":"User","site_admin":false},"body":"**Organizers can create multiple proposals for schedules in the backend, only 1 schedule can be selected and that's the conference schedule.**\r\n\r\nI have created the new associations and models needed for the schedule versioning, illustrated in the following image:\r\n\r\n![nuevodocumento 5_1](https://cloud.githubusercontent.com/assets/16052290/16687181/424bd6e8-4517-11e6-81b6-6898df351463.jpg)\r\n\r\nThe `Schedule` and `EventSchedule` models are new. `EventSchedule` is where the time and room is saved. So, for every `Schedule` and `Event` we can have one `EventSchedule `allowing that an Event is scheduled in different rooms and times for every schedule.\r\n\r\nAlso, the `selected_schedule` in program indicates what of the schedules that belongs to that program is the public one.\r\n","created_at":"2016-07-08T12:24:59Z","updated_at":"2016-08-09T09:10:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13a866cef6504f4f4fb3f3136bb3a776f4626107","assignee":{"login":"ChrisBr","id":3799140,"avatar_url":"https://avatars.githubusercontent.com/u/3799140?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisBr","html_url":"https://github.com/ChrisBr","followers_url":"https://api.github.com/users/ChrisBr/followers","following_url":"https://api.github.com/users/ChrisBr/following{/other_user}","gists_url":"https://api.github.com/users/ChrisBr/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisBr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisBr/subscriptions","organizations_url":"https://api.github.com/users/ChrisBr/orgs","repos_url":"https://api.github.com/users/ChrisBr/repos","events_url":"https://api.github.com/users/ChrisBr/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisBr/received_events","type":"User","site_admin":false},"assignees":[{"login":"ChrisBr","id":3799140,"avatar_url":"https://avatars.githubusercontent.com/u/3799140?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisBr","html_url":"https://github.com/ChrisBr","followers_url":"https://api.github.com/users/ChrisBr/followers","following_url":"https://api.github.com/users/ChrisBr/following{/other_user}","gists_url":"https://api.github.com/users/ChrisBr/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisBr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisBr/subscriptions","organizations_url":"https://api.github.com/users/ChrisBr/orgs","repos_url":"https://api.github.com/users/ChrisBr/repos","events_url":"https://api.github.com/users/ChrisBr/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisBr/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openSUSE/osem/pulls/1094/commits","review_comments_url":"https://api.github.com/repos/openSUSE/osem/pulls/1094/comments","review_comment_url":"https://api.github.com/repos/openSUSE/osem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openSUSE/osem/issues/1094/comments","statuses_url":"https://api.github.com/repos/openSUSE/osem/statuses/2ae99232af47d67abbadaa051dd4e286abef279d","head":{"label":"Ana06:schedule-versioning","ref":"schedule-versioning","sha":"2ae99232af47d67abbadaa051dd4e286abef279d","user":{"login":"Ana06","id":16052290,"avatar_url":"https://avatars.githubusercontent.com/u/16052290?v=3","gravatar_id":"","url":"https://api.github.com/users/Ana06","html_url":"https://github.com/Ana06","followers_url":"https://api.github.com/users/Ana06/followers","following_url":"https://api.github.com/users/Ana06/following{/other_user}","gists_url":"https://api.github.com/users/Ana06/gists{/gist_id}","starred_url":"https://api.github.com/users/Ana06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ana06/subscriptions","organizations_url":"https://api.github.com/users/Ana06/orgs","repos_url":"https://api.github.com/users/Ana06/repos","events_url":"https://api.github.com/users/Ana06/events{/privacy}","received_events_url":"https://api.github.com/users/Ana06/received_events","type":"User","site_admin":false},"repo":{"id":53534728,"name":"osem","full_name":"Ana06/osem","owner":{"login":"Ana06","id":16052290,"avatar_url":"https://avatars.githubusercontent.com/u/16052290?v=3","gravatar_id":"","url":"https://api.github.com/users/Ana06","html_url":"https://github.com/Ana06","followers_url":"https://api.github.com/users/Ana06/followers","following_url":"https://api.github.com/users/Ana06/following{/other_user}","gists_url":"https://api.github.com/users/Ana06/gists{/gist_id}","starred_url":"https://api.github.com/users/Ana06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ana06/subscriptions","organizations_url":"https://api.github.com/users/Ana06/orgs","repos_url":"https://api.github.com/users/Ana06/repos","events_url":"https://api.github.com/users/Ana06/events{/privacy}","received_events_url":"https://api.github.com/users/Ana06/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ana06/osem","description":"Open Source Event Manager. An event management tool tailored to Free and Open Source Software conferences.","fork":true,"url":"https://api.github.com/repos/Ana06/osem","forks_url":"https://api.github.com/repos/Ana06/osem/forks","keys_url":"https://api.github.com/repos/Ana06/osem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ana06/osem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ana06/osem/teams","hooks_url":"https://api.github.com/repos/Ana06/osem/hooks","issue_events_url":"https://api.github.com/repos/Ana06/osem/issues/events{/number}","events_url":"https://api.github.com/repos/Ana06/osem/events","assignees_url":"https://api.github.com/repos/Ana06/osem/assignees{/user}","branches_url":"https://api.github.com/repos/Ana06/osem/branches{/branch}","tags_url":"https://api.github.com/repos/Ana06/osem/tags","blobs_url":"https://api.github.com/repos/Ana06/osem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ana06/osem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ana06/osem/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ana06/osem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ana06/osem/statuses/{sha}","languages_url":"https://api.github.com/repos/Ana06/osem/languages","stargazers_url":"https://api.github.com/repos/Ana06/osem/stargazers","contributors_url":"https://api.github.com/repos/Ana06/osem/contributors","subscribers_url":"https://api.github.com/repos/Ana06/osem/subscribers","subscription_url":"https://api.github.com/repos/Ana06/osem/subscription","commits_url":"https://api.github.com/repos/Ana06/osem/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ana06/osem/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ana06/osem/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ana06/osem/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ana06/osem/contents/{+path}","compare_url":"https://api.github.com/repos/Ana06/osem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ana06/osem/merges","archive_url":"https://api.github.com/repos/Ana06/osem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ana06/osem/downloads","issues_url":"https://api.github.com/repos/Ana06/osem/issues{/number}","pulls_url":"https://api.github.com/repos/Ana06/osem/pulls{/number}","milestones_url":"https://api.github.com/repos/Ana06/osem/milestones{/number}","notifications_url":"https://api.github.com/repos/Ana06/osem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ana06/osem/labels{/name}","releases_url":"https://api.github.com/repos/Ana06/osem/releases{/id}","deployments_url":"https://api.github.com/repos/Ana06/osem/deployments","created_at":"2016-03-09T21:55:32Z","updated_at":"2016-03-09T21:55:56Z","pushed_at":"2016-08-08T22:21:55Z","git_url":"git://github.com/Ana06/osem.git","ssh_url":"git@github.com:Ana06/osem.git","clone_url":"https://github.com/Ana06/osem.git","svn_url":"https://github.com/Ana06/osem","homepage":"http://osem.io","size":22272,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"openSUSE:master","ref":"master","sha":"859b3beda65ea15e8e858806603171cd833d4cf0","user":{"login":"openSUSE","id":623819,"avatar_url":"https://avatars.githubusercontent.com/u/623819?v=3","gravatar_id":"","url":"https://api.github.com/users/openSUSE","html_url":"https://github.com/openSUSE","followers_url":"https://api.github.com/users/openSUSE/followers","following_url":"https://api.github.com/users/openSUSE/following{/other_user}","gists_url":"https://api.github.com/users/openSUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/openSUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openSUSE/subscriptions","organizations_url":"https://api.github.com/users/openSUSE/orgs","repos_url":"https://api.github.com/users/openSUSE/repos","events_url":"https://api.github.com/users/openSUSE/events{/privacy}","received_events_url":"https://api.github.com/users/openSUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":5911225,"name":"osem","full_name":"openSUSE/osem","owner":{"login":"openSUSE","id":623819,"avatar_url":"https://avatars.githubusercontent.com/u/623819?v=3","gravatar_id":"","url":"https://api.github.com/users/openSUSE","html_url":"https://github.com/openSUSE","followers_url":"https://api.github.com/users/openSUSE/followers","following_url":"https://api.github.com/users/openSUSE/following{/other_user}","gists_url":"https://api.github.com/users/openSUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/openSUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openSUSE/subscriptions","organizations_url":"https://api.github.com/users/openSUSE/orgs","repos_url":"https://api.github.com/users/openSUSE/repos","events_url":"https://api.github.com/users/openSUSE/events{/privacy}","received_events_url":"https://api.github.com/users/openSUSE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openSUSE/osem","description":"Open Source Event Manager. An event management tool tailored to Free and Open Source Software conferences.","fork":false,"url":"https://api.github.com/repos/openSUSE/osem","forks_url":"https://api.github.com/repos/openSUSE/osem/forks","keys_url":"https://api.github.com/repos/openSUSE/osem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openSUSE/osem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openSUSE/osem/teams","hooks_url":"https://api.github.com/repos/openSUSE/osem/hooks","issue_events_url":"https://api.github.com/repos/openSUSE/osem/issues/events{/number}","events_url":"https://api.github.com/repos/openSUSE/osem/events","assignees_url":"https://api.github.com/repos/openSUSE/osem/assignees{/user}","branches_url":"https://api.github.com/repos/openSUSE/osem/branches{/branch}","tags_url":"https://api.github.com/repos/openSUSE/osem/tags","blobs_url":"https://api.github.com/repos/openSUSE/osem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openSUSE/osem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openSUSE/osem/git/refs{/sha}","trees_url":"https://api.github.com/repos/openSUSE/osem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openSUSE/osem/statuses/{sha}","languages_url":"https://api.github.com/repos/openSUSE/osem/languages","stargazers_url":"https://api.github.com/repos/openSUSE/osem/stargazers","contributors_url":"https://api.github.com/repos/openSUSE/osem/contributors","subscribers_url":"https://api.github.com/repos/openSUSE/osem/subscribers","subscription_url":"https://api.github.com/repos/openSUSE/osem/subscription","commits_url":"https://api.github.com/repos/openSUSE/osem/commits{/sha}","git_commits_url":"https://api.github.com/repos/openSUSE/osem/git/commits{/sha}","comments_url":"https://api.github.com/repos/openSUSE/osem/comments{/number}","issue_comment_url":"https://api.github.com/repos/openSUSE/osem/issues/comments{/number}","contents_url":"https://api.github.com/repos/openSUSE/osem/contents/{+path}","compare_url":"https://api.github.com/repos/openSUSE/osem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openSUSE/osem/merges","archive_url":"https://api.github.com/repos/openSUSE/osem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openSUSE/osem/downloads","issues_url":"https://api.github.com/repos/openSUSE/osem/issues{/number}","pulls_url":"https://api.github.com/repos/openSUSE/osem/pulls{/number}","milestones_url":"https://api.github.com/repos/openSUSE/osem/milestones{/number}","notifications_url":"https://api.github.com/repos/openSUSE/osem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openSUSE/osem/labels{/name}","releases_url":"https://api.github.com/repos/openSUSE/osem/releases{/id}","deployments_url":"https://api.github.com/repos/openSUSE/osem/deployments","created_at":"2012-09-22T07:40:18Z","updated_at":"2016-08-07T12:09:36Z","pushed_at":"2016-08-08T22:23:38Z","git_url":"git://github.com/openSUSE/osem.git","ssh_url":"git@github.com:openSUSE/osem.git","clone_url":"https://github.com/openSUSE/osem.git","svn_url":"https://github.com/openSUSE/osem","homepage":"http://osem.io","size":40137,"stargazers_count":164,"watchers_count":164,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":117,"mirror_url":null,"open_issues_count":120,"forks":117,"open_issues":120,"watchers":164,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/1094"},"html":{"href":"https://github.com/openSUSE/osem/pull/1094"},"issue":{"href":"https://api.github.com/repos/openSUSE/osem/issues/1094"},"comments":{"href":"https://api.github.com/repos/openSUSE/osem/issues/1094/comments"},"review_comments":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/1094/comments"},"review_comment":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openSUSE/osem/pulls/1094/commits"},"statuses":{"href":"https://api.github.com/repos/openSUSE/osem/statuses/2ae99232af47d67abbadaa051dd4e286abef279d"}}}}
{"actor":{"display_login":"ChrisBr"}}