Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All IBM Notes imported events are public by default #646

Merged
merged 1 commit into from
Apr 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
All IBM Notes imported events are public by default
  • Loading branch information
Fernando Blat committed Apr 20, 2017
commit 819edf5b8ad522f96b96ea72f186a06b17211139
2 changes: 1 addition & 1 deletion lib/ibm_notes/person_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class PersonEvent
def initialize(person, response_event)
@external_id = response_event['id']
@title = response_event['summary']
@state = (response_event['transparency'] == 'transparent') ? 'published' : 'pending'
@state = 'published'
@person = person
set_start_and_end_date(response_event)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ def new_ibm_notes_event
})
end

def new_private_ibm_notes_event
@new_private_ibm_notes_event ||= ::IbmNotes::PersonEvent.new(person, {
'id' => 'Ibm Notes new private event ID',
'summary' => 'Ibm Notes new private event summary',
'start' => { 'date' => '2017-04-11', 'time' => '10:00:00', 'utc' => true },
'end' => { 'date' => '2017-04-11', 'time' => '11:00:00', 'utc' => true },
'transparency' => 'opaque'
})
end

def outdated_ibm_notes_event
@outdated_ibm_notes_event ||= ::IbmNotes::PersonEvent.new(person, {
'id' => 'Ibm Notes outdated event ID',
Expand Down Expand Up @@ -80,7 +70,7 @@ def test_sync_updates_existing_event

refute outdated_ibm_notes_event.gobierto_event_outdated?
assert updated_gobierto_event.title, 'Ibm Notes outdated event title - THIS HAS CHANGED'
refute updated_gobierto_event.published?
assert updated_gobierto_event.published?
end

def test_sync_doesnt_create_duplicated_events
Expand All @@ -94,14 +84,6 @@ def test_sync_doesnt_create_duplicated_events
CalendarIntegration.sync_event(outdated_ibm_notes_event)
end
end

def test_sync_doesnt_import_new_private_events

assert_no_difference 'GobiertoPeople::PersonEvent.count' do
CalendarIntegration.sync_event(new_private_ibm_notes_event)
end
end

end
end
end