little alteration in spec test

pull/859/head
Jonas Heinrich 11 years ago
parent dffa595bce
commit 5ce30b12b7
  1. 16
      spec/models/group_spec.rb

@ -70,13 +70,15 @@ describe Group do
describe :create do
describe 'group with empty group name' do
before do
@g = Group.new(:lastname => "")
@g.save
end
let(:group) { FactoryGirl.build(:group, lastname: '') }
it { @g.valid?.should be_false }
it { @g.errors.full_messages[0].should include I18n.t('attributes.groupname')}
it { expect(group.valid?).to be_false }
describe 'error message' do
before { group.valid? }
it { expect(group.errors.full_messages[0]).to include I18n.t('attributes.groupname')}
end
end
end
end
end
Loading…
Cancel
Save