Create sdg manager

This commit is contained in:
taitus
2020-11-25 12:02:19 +01:00
committed by Javi Martín
parent 599332f26e
commit cd7185f317
6 changed files with 44 additions and 1 deletions

View File

@@ -189,6 +189,18 @@ describe User do
end
end
describe "sdg_manager?" do
it "is false when the user is not a sdg manager" do
expect(subject.sdg_manager?).to be false
end
it "is true when the user is a sdg manager" do
subject.save!
create(:sdg_manager, user: subject)
expect(subject.sdg_manager?).to be true
end
end
describe "poll_officer?" do
it "is false when the user is not a poll officer" do
expect(subject.poll_officer?).to be false