Make admin serialiser specs runnable on their own

This commit is contained in:
Maikel Linke
2018-07-10 09:59:00 +10:00
parent 3dacd06b6b
commit b478ef9fd0
6 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
require 'spec_helper'
module Api
module Admin
# Used by admin subscription form

View File

@@ -1,3 +1,5 @@
require 'spec_helper'
describe Api::Admin::CustomerSerializer do
let(:customer) { create(:customer, tag_list: "one, two, three") }
let!(:tag_rule) { create(:tag_rule, enterprise: customer.enterprise, preferred_customer_tags: "two") }

View File

@@ -1,3 +1,5 @@
require 'spec_helper'
describe Api::Admin::EnterpriseSerializer do
let(:enterprise) { create(:distributor_enterprise) }
it "serializes an enterprise" do

View File

@@ -1,3 +1,4 @@
require 'spec_helper'
require 'open_food_network/order_cycle_permissions'
describe Api::Admin::ExchangeSerializer do

View File

@@ -1,3 +1,5 @@
require 'spec_helper'
describe Api::Admin::IndexEnterpriseSerializer do
include AuthenticationWorkflow

View File

@@ -1,3 +1,5 @@
require 'spec_helper'
describe Api::Admin::SubscriptionCustomerSerializer do
let(:address) { build(:address) }
let(:customer) { build(:customer) }