Skip to content

Commit

Permalink
fixup some indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Aug 13, 2023
1 parent 762b7c4 commit c4cc1d9
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions spec/controllers/teachers_signup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
it "rejects invalid signup school information" do
previous_count = Teacher.count
post :create, params: {
school: {
city: "Berkeley",
state: "CA",
},
teacher: {
first_name: "invalid",
last_name: "invalid",
email: "[email protected]",
status: "invalid",
snap: "invalid"
}
school: {
city: "Berkeley",
state: "CA",
},
teacher: {
first_name: "invalid",
last_name: "invalid",
email: "[email protected]",
status: "invalid",
snap: "invalid"
}
}
expect(Teacher.count).to eq(previous_count)
expect(flash[:alert]).to match(/An error occurred/)
Expand All @@ -48,32 +48,32 @@
it "accepts valid signup information" do
previous_count = Teacher.count
post :create, params: {
school: {
name: "valid_example",
city: "Berkeley",
state: "CA",
website: "valid_example.com",
school_type: "Public",
grade_level: "High School"
},
teacher: {
first_name: "valid_example",
last_name: "valid_example",
email: "valid_example@valid_example.edu",
status: 0,
snap: "valid_example"
}
school: {
name: "valid_example",
city: "Berkeley",
state: "CA",
website: "valid_example.com",
school_type: "Public",
grade_level: "High School"
},
teacher: {
first_name: "valid_example",
last_name: "valid_example",
email: "valid_example@valid_example.edu",
status: 0,
snap: "valid_example"
}
}
expect(Teacher.count).to eq(previous_count + 1)
assert_match(/Thanks for signing up for BJC/, flash[:success])
end

it "redirects existing users to the login page" do
post :create, params: {
school: {
id: 1
},
teacher: Teacher.first.attributes
school: {
id: 1
},
teacher: Teacher.first.attributes
}
expect(response).to redirect_to(login_path)
expect(flash[:notice]).to match(/Please log in/)
Expand Down

0 comments on commit c4cc1d9

Please sign in to comment.