Skip to content

Instantly share code, notes, and snippets.

View elliotlarson's full-sized avatar

Elliot Larson elliotlarson

View GitHub Profile
@elliotlarson
elliotlarson / test3_us_project.json
Last active January 20, 2026 23:17
API V4 Test: US project with zip code - Regression test, should return 201
{
"_comment": "Test 3: US project with zip code - Regression test - Expected: 201 Created",
"_note": "This test verifies US projects still work correctly. Replace USER_EMAIL_HERE and panel.id with valid values.",
"project": {
"name": "Test US Project - Regression Test",
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zip": "94107",
"country": "US",
@elliotlarson
elliotlarson / test2_non_us_incorrect.json
Last active January 20, 2026 23:17
API V4 Test: Non-US project with INCORRECT field name (non_us_postal_code) - Should return 422
{
"_comment": "Test 2: Non-US project with INCORRECT field name (non_us_postal_code) - Expected: 422 Unprocessable Content",
"_note": "This test verifies that the OLD typo field name is rejected. Replace USER_EMAIL_HERE and panel.id with valid values.",
"project": {
"name": "Test Canadian Project - Incorrect Field (Should Fail)",
"street": "100 Queen Street West",
"city": "Toronto",
"state": "ON",
"country": "CA",
"non_us_postal_code": "M5H 2N2",
@elliotlarson
elliotlarson / test1_non_us_correct.json
Last active January 20, 2026 23:17
API V4 Test: Non-US project with correct field name (non_usa_postal_code) - Should return 201
{
"_comment": "Test 1: Non-US project with CORRECT field name (non_usa_postal_code) - Expected: 201 Created",
"_note": "Replace USER_EMAIL_HERE with a valid user email that has granted partner access. Replace panel.id with a valid panel ID from your environment.",
"project": {
"name": "Test Canadian Project - Correct Field",
"street": "100 Queen Street West",
"city": "Toronto",
"state": "ON",
"country": "CA",
"non_usa_postal_code": "M5H 2N2",
@elliotlarson
elliotlarson / attachment_spans_ff2_only.json
Created December 17, 2025 00:11
API V4 Attachment Spans: ff2 (regression test)
{
"parameters": {
"asce": "7-16",
"zipCode": "91320",
"windSpeed": 94,
"groundSnowLoad": 1,
"windExposure": "B",
"sds": 1.25,
"siteElevation": 699,
"panelLengthMm": 1130,
@elliotlarson
elliotlarson / attachment_spans_corruslide.json
Created December 17, 2025 00:11
API V4 Attachment Spans: corruslide with corrugatedRoofGauge
{
"parameters": {
"asce": "7-16",
"zipCode": "91320",
"windSpeed": 94,
"groundSnowLoad": 1,
"windExposure": "B",
"sds": 1.25,
"siteElevation": 699,
"panelLengthMm": 1130,
@elliotlarson
elliotlarson / attachment_spans_simple_grip_d.json
Created December 17, 2025 00:11
API V4 Attachment Spans: simple_grip_d with deckThickness
{
"parameters": {
"asce": "7-16",
"zipCode": "91320",
"windSpeed": 94,
"groundSnowLoad": 1,
"windExposure": "B",
"sds": 1.25,
"siteElevation": 699,
"panelLengthMm": 1130,
@elliotlarson
elliotlarson / attachment_spans_qm_hug_d.json
Created December 17, 2025 00:11
API V4 Attachment Spans: qm_hug_d with deckThickness
{
"parameters": {
"asce": "7-16",
"zipCode": "91320",
"windSpeed": 94,
"groundSnowLoad": 1,
"windExposure": "B",
"sds": 1.25,
"siteElevation": 699,
"panelLengthMm": 1130,
@elliotlarson
elliotlarson / asce_716_complete.json
Created November 26, 2025 00:18
API V4 Conditional Requirements - Test Payloads
{
"project": {
"name": "ASCE 7-16 Test - Complete with Roof Shape",
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zip": "94107",
"country": "US",
"asce": "7-16",
"riskCategory": "II",
require 'test_helper'
class FoosControllerTest < ActionDispatch::IntegrationTest
setup do
@foo = foos(:one)
end
test "should get index" do
get foos_url
assert_response :success
import uuid from "uuid/v4";
import { combineReducers } from "redux";
export const types = {
CREATE: "CHARACTERS_CREATE",
UPDATE: "CHARACTERS_UPDATE",
DELETE: "CHARACTERS_DELETE"
};
const byId = (state = {}, action) => {