AutoCommit Mon Sep 14 00:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-09-14 00:03:01 +02:00
parent 10949e9708
commit a47c6fea7a
3 changed files with 7 additions and 1 deletions

View File

@@ -3,5 +3,7 @@
FactoryGirl.define do FactoryGirl.define do
factory :attachment do factory :attachment do
name "MyString" name "MyString"
datei { Rack::Test::UploadedFile.new(File.join(Rails.root,'public','fetlogo.png'))}
flag_titlepic false
end end
end end

View File

@@ -2,4 +2,9 @@ require 'spec_helper'
describe Attachment do describe Attachment do
pending "add some examples to (or delete) #{__FILE__}" pending "add some examples to (or delete) #{__FILE__}"
let(:attachment) {FactoryGirl.build_stubbed(:attachment)}
it "responds to image" do
expect(attachment.respond_to?(:image?)).to be true
end
end end

View File

@@ -18,7 +18,6 @@ describe Beispiel, :type=>:model do
let(:beispiel){FactoryGirl.build(:beispiel, lva: lva)} let(:beispiel){FactoryGirl.build(:beispiel, lva: lva)}
it "should be created" do it "should be created" do
expect{beispiel.save!; Sunspot.commit}.to change{Beispiel.count}.by(1) expect{beispiel.save!; Sunspot.commit}.to change{Beispiel.count}.by(1)
end end
it "is not valid without lva" do it "is not valid without lva" do