basic model tests, remove free payment

This commit is contained in:
Torsten Ruger 2016-11-05 10:28:02 +02:00
parent 17f65a9c5a
commit 6f5d7a4908
13 changed files with 21 additions and 5 deletions

View File

View File

View File

@ -1,6 +1,5 @@
class Apply < ActiveRecord::Base
PLANS = { free: "Free places - Only for women for 26.9" ,
standard: "2100¢ - 8 week prepayment, no cancellation" ,
PLANS = { standard: "2100¢ - 8 week prepayment, no cancellation" ,
flex: "2400¢ - 8 week prepayment, 2 week cancellation" ,
super_flex: "2900¢ - 2 week prepayment, stop anytime" }

View File

View File

View File

@ -1,5 +1,14 @@
require 'rails_helper'
RSpec.describe Apply, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
it "has a factory" do
apply = build(:apply)
expect(apply.save).to be true
end
it "validates the course correctly" do
apply = build(:apply , primary_choice_course_id: nil)
expect(apply.save).to be false
end
end

View File

@ -1,5 +1,9 @@
require 'rails_helper'
RSpec.describe Course, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
it "has a working factory" do
course = build :course
expect(course.save).to eq true
end
end

View File

@ -1,5 +1,9 @@
require 'rails_helper'
RSpec.describe Resume, type: :model do
pending "add some examples to (or delete) #{__FILE__}"
it "has a working factory" do
resume = build :resume
expect(resume.save).to eq true
end
end

View File

View File