Fix typos and add test cases where pass single role as an array

This commit is contained in:
Oleg Sulyanov 2014-04-04 16:27:24 +07:00
parent 6e561c5343
commit cbfe5f7625

View file

@ -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