Skip to content

Instantly share code, notes, and snippets.

describe('template_renderer.directive', () => {
let $compile,
$rootScope;
beforeEach(angular.mock.module('beauty'));
beforeEach(inject((_$compile_, _$rootScope_) => {
$compile = _$compile_;
$rootScope = _$rootScope_;
}));
{
"product_categories": [
{
"id":46,
"name":"Skin",
"thumbnail":null,
"subcategories":[
]
},
class Variant::AvailabilityProvider
attr_accessor :variant, :context
def initialize(variant, context = nil)
@variant = variant
@context = context
end
def is_available?
{
product_category: {
id:48,
name: "Lips",
permalink:"lips",
thumbnail:null,
product_ids: [
173,
172
],
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 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 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 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
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
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