|
|
@ -306,7 +306,7 @@ describe TimeEntry, type: :model do |
|
|
|
time_entry.save! |
|
|
|
time_entry.save! |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it { expect(TimeEntry.visible(user2, project).all).to match_array([time_entry]) } |
|
|
|
it { expect(TimeEntry.visible(user2, project)).to match_array([time_entry]) } |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "WHEN not having the view_time_entries permission |
|
|
|
describe "WHEN not having the view_time_entries permission |
|
|
@ -318,7 +318,7 @@ describe TimeEntry, type: :model do |
|
|
|
time_entry.save! |
|
|
|
time_entry.save! |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it { expect(TimeEntry.visible(user2, project).all).to match_array([]) } |
|
|
|
it { expect(TimeEntry.visible(user2, project)).to match_array([]) } |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "WHEN having the view_own_time_entries permission |
|
|
|
describe "WHEN having the view_own_time_entries permission |
|
|
@ -332,7 +332,7 @@ describe TimeEntry, type: :model do |
|
|
|
time_entry.save! |
|
|
|
time_entry.save! |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it { expect(TimeEntry.visible(user2, project).all).to match_array([]) } |
|
|
|
it { expect(TimeEntry.visible(user2, project)).to match_array([]) } |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
describe "WHEN having the view_own_time_entries permission |
|
|
|
describe "WHEN having the view_own_time_entries permission |
|
|
@ -346,7 +346,7 @@ describe TimeEntry, type: :model do |
|
|
|
time_entry2.save! |
|
|
|
time_entry2.save! |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it { expect(TimeEntry.visible(time_entry2.user, project).all).to match_array([time_entry2]) } |
|
|
|
it { expect(TimeEntry.visible(time_entry2.user, project)).to match_array([time_entry2]) } |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|