Sha256: 0e7190c0d202c1ece4f438056e02fca9caad6599bb17eb2658b4282d1912d79b
Contents?: true
Size: 970 Bytes
Versions: 2
Compression:
Stored size: 970 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe Lolita::Configuration::Tab::Files do let(:dbi){Lolita::DBI::Base.new(Post)} let(:tab){Lolita::Configuration::Tab::Files.new(dbi)} it "should create new file tab" do Lolita::Configuration::Tab::Files.new(dbi).type.should == :files end describe "extensions" do it "should return empty array for new tab" do tab.filters.should == [] end it "all can be assigned" do tab.filters=["pdf","xls"] tab.filters.should == ["pdf", "xls"] end it "should allow to add new one" do tab.filters("Image","pdf") tab.filters.should == [{:title=>"Image",:extensions=>"pdf"}] end end describe "maximum file size" do it "should be changable" do tab.maxfilesize=2048 tab.maxfilesize.should == 2048 tab.maxfilesize(1024) tab.maxfilesize.should == 1024 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lolita-file-upload-0.2.1 | spec/configuration/tab/files_spec.rb |
lolita-file-upload-0.2.0 | spec/configuration/tab/files_spec.rb |