mirror of
https://github.com/Fishwaldo/role_model.git
synced 2025-03-15 11:32:04 +00:00
Fix typos and add test cases where pass single role as an array
This commit is contained in:
parent
6e561c5343
commit
cbfe5f7625
1 changed files with 8 additions and 2 deletions
|
@ -216,13 +216,19 @@ describe RoleModel do
|
|||
subject.should have(1).roles
|
||||
end
|
||||
|
||||
it "should delete a existing roles given as an array of symbols" do
|
||||
it "should delete a existing single role given as an array" do
|
||||
subject.roles.delete [:foo]
|
||||
expect(subject.roles).not_to include([:foo])
|
||||
expect(subject).to have(1).roles
|
||||
end
|
||||
|
||||
it "should delete existing roles given as an array of symbols" do
|
||||
subject.roles.delete [:foo, :bar]
|
||||
expect(subject.roles).not_to include([:foo, :bar])
|
||||
expect(subject).to have(0).roles
|
||||
end
|
||||
|
||||
it "should delete a existing roles given as an array of strings" do
|
||||
it "should delete existing roles given as an array of strings" do
|
||||
subject.roles.delete %w(foo bar)
|
||||
expect(subject.roles).not_to include([:foo, :bar])
|
||||
expect(subject).to have(0).roles
|
||||
|
|
Loading…
Add table
Reference in a new issue