AutoCommit Son Aug 30 16:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-30 16:03:01 +02:00
parent 4a671f5cff
commit 8bfd96d0af
3 changed files with 38 additions and 5 deletions

View File

@@ -40,16 +40,23 @@ describe Beispiel do
end end
it "should respond to flag setter #{flg}" do 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
end end
it "should be in beispiele " do it "should be in not_flag beispiele" do
@b.save! @b.save!
bsp= Beispiel.not_flag_delete bsp= Beispiel.not_flag_delete
expect(bsp).to include @b expect(bsp).to include @b
end 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 end

View File

@@ -1,5 +1,25 @@
require 'spec_helper' require 'spec_helper'
describe Fetprofile do 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 end

View File

@@ -1,5 +1,11 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe Survey::Question, :type => :model do 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__}" pending "add some examples to (or delete) #{__FILE__}"
end end