Skip to content

Instantly share code, notes, and snippets.

View alexanderfrankel's full-sized avatar

Alexander Frankel alexanderfrankel

  • New York, New York
View GitHub Profile
{
"bills" => [
{
due: "2019-01-01",
line_items: [
{
type: "occupancy_fee",
amount_cents: 1500_00
},
{
@alexanderfrankel
alexanderfrankel / generate_bills_request.rb
Last active July 31, 2020 18:28
generate_bills_request
{
"occupancy_id" => "123",
"billing_type" => "zuora",
"payers" => [
{
"id" => "123",
"name" => "asd",
"email" => "[email protected]"
},
{
@alexanderfrankel
alexanderfrankel / get_occ_response.rb
Last active July 31, 2020 18:55
get_occupancy_response
{
"occupancy_id" => "123",
"billing_type" => "zuora",
"payers" => [
{
"id" => "123",
"name" => "asd",
"email" => "[email protected]",
"split_percentage" => "50",
"flat_amount_cents" => ""

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@alexanderfrankel
alexanderfrankel / testing-with-karms-my-controller.js
Created December 28, 2015 20:55
testing-with-karms-my-controller.js
// This is the controller definition
// my-controller.js
var myApp = angular.module('myApp', []);
myApp.controller('MyController', ['$scope', '$http', function($scope, $http) {
$scope.grades = ['first', 'second', 'third']
$scope.selectedGrade = null;
$scope.selectedStudents = [];
$scope.allStudents = [];
@alexanderfrankel
alexanderfrankel / testing-in-kama-describe-only.js
Last active December 28, 2015 20:50
testing-in-kama-describe-only.js
describe.only('selecting a grade', function() {
beforeEach(function() {
$scope.selectGrade("third");
});
...
});
@alexanderfrankel
alexanderfrankel / testing-in-karma-dot-only.js
Last active December 28, 2015 20:52
testing-in-karma-dot-only.js
describe.only('MyController', function() {
// define some variables
var scope, httpBackend, myController;
// load in our app
beforeEach(module('MyApp'));
// code to execute before each of our tests
beforeEach(inject(function($rootScope, $httpBackend, $controller) {
@alexanderfrankel
alexanderfrankel / testing-in-karma-deselecting-a-grade-spec.js
Last active December 28, 2015 20:52
testing-in-karma-deselecting-a-grade-spec.js
describe('deselecting a grade', function() {
beforeEach(function() {
$scope.deselectGrade();
});
it('resets selectedGrade to null', function() {
expect($scope.selectedGrade).to.be(null);
});
it('resets selectedStudents to empty array', function() {
@alexanderfrankel
alexanderfrankel / testing-in-karma-selecting-a-grade-spec.js
Last active December 28, 2015 20:52
testing-in-karma-selecting-a-grade-spec.js
describe('selecting a grade', function() {
beforeEach(function() {
$scope.selectGrade("third");
});
it('sets selectedGrade to the grade that was selected', function() {
expect($scope.selectedGrade).to.equal("third");
});
it('sets selectedStudents to an array all students in the grade that was selected', function() {
@alexanderfrankel
alexanderfrankel / testing-in-karma-initialization-test.js
Last active December 28, 2015 20:52
testing-in-karma-initialization-test.js
describe('initialization', function() {
it('sets grades to default array of grades', function() {
expect($scope.grades).to.equal(["first", "second", "third"]);
});
it('sets selectedGrade to null', function() {
expect($scope.selectedGrade).to.be.null;
});
it('sets selectedStudents to empty array', function() {