basic model tests, remove free payment
This commit is contained in:
parent
17f65a9c5a
commit
6f5d7a4908
|
@ -1,6 +1,5 @@
|
||||||
class Apply < ActiveRecord::Base
|
class Apply < ActiveRecord::Base
|
||||||
PLANS = { free: "Free places - Only for women for 26.9" ,
|
PLANS = { standard: "2100¢ - 8 week prepayment, no cancellation" ,
|
||||||
standard: "2100¢ - 8 week prepayment, no cancellation" ,
|
|
||||||
flex: "2400¢ - 8 week prepayment, 2 week cancellation" ,
|
flex: "2400¢ - 8 week prepayment, 2 week cancellation" ,
|
||||||
super_flex: "2900¢ - 2 week prepayment, stop anytime" }
|
super_flex: "2900¢ - 2 week prepayment, stop anytime" }
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe Apply, type: :model do
|
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
|
end
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe Course, type: :model do
|
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
|
end
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe Resume, type: :model do
|
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
|
end
|
||||||
|
|
Loading…
Reference in New Issue