|
|
|
@ -43,7 +43,7 @@ describe ::API::V3::UserPreferences::UserPreferenceRepresenter, |
|
|
|
|
{ |
|
|
|
|
'notifications' => [ |
|
|
|
|
{ |
|
|
|
|
'all' => true, |
|
|
|
|
'involved' => true, |
|
|
|
|
'_links' => { |
|
|
|
|
'project' => { |
|
|
|
|
'href' => '/api/v3/projects/1' |
|
|
|
@ -51,7 +51,7 @@ describe ::API::V3::UserPreferences::UserPreferenceRepresenter, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
'all' => false, |
|
|
|
|
'involved' => false, |
|
|
|
|
'mentioned' => true, |
|
|
|
|
'_links' => { |
|
|
|
|
'project' => { |
|
|
|
@ -69,10 +69,11 @@ describe ::API::V3::UserPreferences::UserPreferenceRepresenter, |
|
|
|
|
in_project, global = subject.notification_settings |
|
|
|
|
|
|
|
|
|
expect(in_project[:project_id]).to eq "1" |
|
|
|
|
expect(in_project[:all]).to be_truthy |
|
|
|
|
expect(in_project[:involved]).to be_truthy |
|
|
|
|
expect(in_project[:mentioned]).to be_nil |
|
|
|
|
|
|
|
|
|
expect(global[:project_id]).to eq nil |
|
|
|
|
expect(global[:all]).to eq false |
|
|
|
|
expect(global[:involved]).to eq false |
|
|
|
|
expect(global[:mentioned]).to eq true |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|