baarkerlounger
3 years ago
3 changed files with 30 additions and 0 deletions
@ -0,0 +1,4 @@ |
|||||||
|
require "rails_helper" |
||||||
|
|
||||||
|
RSpec.describe Form, type: :model do |
||||||
|
end |
@ -0,0 +1,17 @@ |
|||||||
|
require "rails_helper" |
||||||
|
|
||||||
|
RSpec.describe Form, type: :model do |
||||||
|
describe ".next_question" do |
||||||
|
let(:previous_question) { "tenant_age" } |
||||||
|
it "returns the next question given the previous" do |
||||||
|
expect(Form.next_question(previous_question)).to eq("tenant_gender") |
||||||
|
end |
||||||
|
end |
||||||
|
|
||||||
|
describe ".first_question_for_subsection" do |
||||||
|
let(:subsection) { "household_characteristics" } |
||||||
|
it "returns the next question given the previous" do |
||||||
|
expect(Form.first_question_for_subsection(subsection)).to eq("tenant_code") |
||||||
|
end |
||||||
|
end |
||||||
|
end |
Loading…
Reference in new issue