diff options
author | 2010-07-20 12:31:59 +0200 | |
---|---|---|
committer | 2010-07-27 23:02:44 +0200 | |
commit | 7d0b0db18c4b5399e4bbb7b14717f255985e93e2 (patch) | |
tree | 8d7407e9e578611f1fb8fa49a31a43c0e251ca79 /spec | |
parent | Rewrote Question#answered? to more efficient & easier to understand (diff) | |
download | recruiting-webapp-7d0b0db18c4b5399e4bbb7b14717f255985e93e2.tar.gz recruiting-webapp-7d0b0db18c4b5399e4bbb7b14717f255985e93e2.tar.bz2 recruiting-webapp-7d0b0db18c4b5399e4bbb7b14717f255985e93e2.zip |
Bugfix: Questions created by administrators were not approved.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/question_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/models/question_spec.rb b/spec/models/question_spec.rb index 62145b1..a0026ec 100644 --- a/spec/models/question_spec.rb +++ b/spec/models/question_spec.rb @@ -177,4 +177,9 @@ describe Question do question.should_not be_editable_by(admin, :user) end + + it "should be approved if was created by administrator or unspecified user" do + Factory(:question, :user => Factory(:administrator)).approved.should be_true + Factory(:question, :user => nil).approved.should be_true + end end |