Permalink
Browse files

fixed rspec error.

  • Loading branch information...
1 parent 13f4075 commit a417eae7c28e2e7e381b8423a653a437d92bf2ef @saberma saberma committed Feb 21, 2012
Showing with 15 additions and 1 deletion.
  1. +12 −0 spec/factories/users.rb
  2. +3 −1 spec/models/shop_spec.rb
View
@@ -36,4 +36,16 @@
admin false
end
+ factory :free_user, class: User do # 免费用户
+ email 'free@shopqi.com'
+ shop_attributes({
+ name: '免费商店',
+ email: 'free@shopqi.com',
+ plan: 'free',
+ domains_attributes: [{subdomain: 'free', domain: Setting.store_host}]
+ })
+ password '666666'
+ password_confirmation '666666'
+ end
+
end
View
@@ -54,8 +54,10 @@
context 'free' do # 免费版本
+ let(:free_shop) { Factory(:free_user).shop }
+
it 'should not init deadline' do # 没有截止时间
- shop.deadline.should be_nil
+ free_shop.deadline.should be_nil
end
end

0 comments on commit a417eae

Please sign in to comment.