forked from bofh/fetsite
AutoCommit Son Aug 30 16:03:01 CEST 2015
This commit is contained in:
@@ -40,16 +40,23 @@ describe Beispiel do
|
||||
end
|
||||
|
||||
it "should respond to flag setter #{flg}" do
|
||||
expect(@b.respond_to?("flag_#{flg.to_s}=".to_sym)).to be true
|
||||
puts "flag_#{flg.to_s}"
|
||||
expect(@b.respond_to?("flag_#{flg.to_s}".to_sym)).to be true
|
||||
end
|
||||
end
|
||||
|
||||
it "should be in beispiele " do
|
||||
it "should be in not_flag beispiele" do
|
||||
@b.save!
|
||||
bsp= Beispiel.not_flag_delete
|
||||
expect(bsp).to include @b
|
||||
end
|
||||
it "should not be in not_flag" do
|
||||
@b.save!
|
||||
bsp= Beispiel.not_flag_delete
|
||||
expect{@b.flag_delete=true; @b.save!}.to change{ Beispiel.not_flag_delete.count }.by(-1)
|
||||
expect{@b.flag_delete=nil; @b.save!}.to change{ Beispiel.not_flag_delete.count }.by(1)
|
||||
|
||||
|
||||
pending "should be flagable"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Fetprofile do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
[:vorname,:nachname].each do |attr|
|
||||
it "should not be valid without #{attr}" do
|
||||
fp = FactoryGirl.build(:fetprofile)
|
||||
fp.send("#{attr}=".to_sym,nil)
|
||||
fp.should_not be_valid
|
||||
end
|
||||
end
|
||||
it "should be valid" do
|
||||
fp = FactoryGirl.build(:fetprofile)
|
||||
fp.should be_valid
|
||||
end
|
||||
it "should not be valid with short name" do
|
||||
fp = FactoryGirl.build(:fetprofile)
|
||||
fp.nachname ="S"
|
||||
fp.should_not be_valid
|
||||
fp.vorname ="d"
|
||||
fp.should_not be_valid
|
||||
end
|
||||
pending "have memberships"
|
||||
pending "be associated to gremien"
|
||||
|
||||
end
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Survey::Question, :type => :model do
|
||||
pending "have choices"
|
||||
pending "be lockable"
|
||||
pending "be flagable"
|
||||
pending "copy from template"
|
||||
pending "attributes for copy"
|
||||
pending "have do answer"
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user