This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('template_renderer.directive', () => { | |
let $compile, | |
$rootScope; | |
beforeEach(angular.mock.module('beauty')); | |
beforeEach(inject((_$compile_, _$rootScope_) => { | |
$compile = _$compile_; | |
$rootScope = _$rootScope_; | |
})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"product_categories": [ | |
{ | |
"id":46, | |
"name":"Skin", | |
"thumbnail":null, | |
"subcategories":[ | |
] | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Variant::AvailabilityProvider | |
attr_accessor :variant, :context | |
def initialize(variant, context = nil) | |
@variant = variant | |
@context = context | |
end | |
def is_available? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
product_category: { | |
id:48, | |
name: "Lips", | |
permalink:"lips", | |
thumbnail:null, | |
product_ids: [ | |
173, | |
172 | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl; | |
server_name api.honest.dev; | |
ssl_certificate /usr/local/etc/nginx/ssl/api.crt; | |
ssl_certificate_key /usr/local/etc/nginx/ssl/api.key; | |
ssl_session_cache shared:SSL:1m; | |
ssl_session_timeout 5m; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This calss decides whether or not we should attempt to update a credit | |
# card via the account updater | |
class CreditCard::AccountUpdatePolicy | |
# Initializes the class | |
# @param [CreditCard] credit_card The credit card we want to check for updating | |
def initialize(credit_card) | |
@credit_card = credit_card | |
end | |
# Determines if we should attempt to update this card |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This calss decides whether or not we should attempt to update a credit | |
# card via the account updater | |
class CreditCard::AccountUpdatePolicy | |
# Initializes the class | |
# @param [CreditCard] credit_card The credit card we want to check for updating | |
# @raise [StandardError] Raised if the credit card doesn't have it's transactions and orders loaded | |
def initialize(credit_card) | |
@credit_card = credit_card | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This calss decides whether or not we should attempt to update a credit | |
# card via the account updater | |
class CreditCard::AccountUpdatePolicy | |
# Initializes the class | |
# @param [CreditCard] credit_card The credit card we want to check for updating | |
# @raise [StandardError] Raised if the credit card doesn't have it's transactions and orders loaded | |
def initialize(credit_card) | |
if !credit_card.transactions.loaded? || !credit_card.orders.loaded? then | |
raise StandardError.new("Please preload the transactions and orders for this credit card") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe Scheduled::ChaseCardUpdateRequestJob do | |
describe "#execute" do | |
before do | |
orders | |
Scheduled::ChaseCardUpdateRequestJob.new.execute | |
end | |
memoized_context "Order being shipped in the next 10 days that needs an updated card" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe Scheduled::ChaseCardUpdateRequestJob do | |
describe "#execute" do | |
before do | |
orders | |
Scheduled::ChaseCardUpdateRequestJob.new.execute | |
end | |
testing_context "Order being shipped in the next 10 days that needs an updated card" do |