23 lines
595 B
Ruby
23 lines
595 B
Ruby
require 'spec_helper'
|
|
|
|
describe CrashDump do
|
|
before do
|
|
end
|
|
|
|
it "should fail to save a crash dump without a client_type and client_version" do
|
|
CrashDump.new(:client_type => "", :client_version => "version").should_not be_valid
|
|
CrashDump.new(:client_type => "type", :client_version => "").should_not be_valid
|
|
end
|
|
|
|
it "should be able to save a crash dump with JUST a client_type and client_version" do
|
|
@cd = CrashDump.new
|
|
@cd.client_type = "Win32"
|
|
@cd.client_version = "version"
|
|
@cd.should be_valid
|
|
@cd.save
|
|
|
|
CrashDump.first.id.should == @cd.id
|
|
end
|
|
|
|
end
|