Sha256: 989833202dbb5f96f548e020d5efe6b22d804bf0b9991ec069b71baee9f41789
Contents?: true
Size: 1.07 KB
Versions: 5
Compression:
Stored size: 1.07 KB
Contents
require 'rails_helper' describe PaidUp::Feature do it { should validate_presence_of(:slug) } it { should validate_presence_of(:title) } it { should validate_presence_of(:setting_type) } it { should validate_inclusion_of(:setting_type).in_array(%w(boolean table_rows rolify_rows))} include_context 'plans and features' context '#feature_model' do subject { groups_feature.feature_model } it { should eq Group } end context '#feature_model_name' do subject { groups_feature.feature_model_name } it { should eq 'Group' } end context '.all' do subject { PaidUp::Feature.all } it { should eq [ad_free_feature, groups_feature, doodads_feature] } end context '.find_by_slug' do subject { PaidUp::Feature.find_by_slug('groups') } it { should be_a PaidUp::Feature } end context '.find_all' do subject { PaidUp::Feature.find_all( setting_type: 'rolify_rows') } it { should be_an Array } end context '.find' do subject { PaidUp::Feature.find(setting_type: 'rolify_rows') } it { should be_a PaidUp::Feature } end end
Version data entries
5 entries across 5 versions & 1 rubygems