21 lines
562 B
Ruby
21 lines
562 B
Ruby
require 'spec_helper'
|
|
|
|
describe IcecastSourceChange do
|
|
|
|
let(:change) { FactoryBot.create(:icecast_source_change) }
|
|
|
|
it "validates" do
|
|
bad_change = IcecastSourceChange.new
|
|
bad_change.save.should be false
|
|
bad_change.errors[:change_type].should == ["is not included in the list"]
|
|
bad_change.errors[:source_direction].should == ["is not included in the list"]
|
|
bad_change.errors[:success].should == ["is not included in the list"]
|
|
bad_change.errors[:mount].should == ["can't be blank"]
|
|
end
|
|
|
|
it "success" do
|
|
change.touch
|
|
end
|
|
|
|
end
|