mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Previous implementation was associating resources with all
the roles regardless of user role in the resource. ie:
if user is cfp member of conf1, the method was returning:
{ organizer => conf1,
cfp => conf1,
Info Desk => conf1,
Volunteers Coordinator => conf1
}
10 lines
299 B
Ruby
10 lines
299 B
Ruby
require 'spec_helper'
|
|
|
|
describe ApplicationHelper, type: :helper do
|
|
describe 'show_roles' do
|
|
it 'formats the hash passed' do
|
|
roles = { 'organizer' => ['oSC16', 'oSC15'], 'cfp' => ['oSC16'] }
|
|
expect(show_roles(roles)).to eq 'Organizer (oSC16, oSC15), Cfp (oSC16)'
|
|
end
|
|
end
|
|
end
|