mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Repair specs
This commit is contained in:
committed by
Rachel Arnould
parent
657df9eb8f
commit
3c7c02da2f
@@ -28,21 +28,21 @@
|
||||
.row
|
||||
.alpha.eleven.columns
|
||||
.three.columns.alpha
|
||||
= f.label :sells, t('primary_details.sells', scope: scope)
|
||||
%div{'ofn-with-tip' => t('primary_details.sells_tip', scope: scope)}
|
||||
= f.label :sells, t('admin_only.sells', scope: scope)
|
||||
%div{'ofn-with-tip' => t('admin_only.sells_tip', scope: scope)}
|
||||
%a What's this?
|
||||
.two.columns
|
||||
= f.radio_button :sells, "none", 'ng-model' => 'Enterprise.sells'
|
||||
|
||||
= f.label :sells, t('primary_details.none', scope: scope), value: "none"
|
||||
= f.label :sells, t('admin_only.none', scope: scope), value: "none"
|
||||
.two.columns
|
||||
= f.radio_button :sells, "own", 'ng-model' => 'Enterprise.sells'
|
||||
|
||||
= f.label :sells, t('primary_details.own', scope: scope), value: "own"
|
||||
= f.label :sells, t('admin_only.own', scope: scope), value: "own"
|
||||
.four.columns.omega
|
||||
= f.radio_button :sells, "any", 'ng-model' => 'Enterprise.sells'
|
||||
|
||||
= f.label :sells, t('primary_details.any', scope: scope), value: "any"
|
||||
= f.label :sells, t('admin_only.any', scope: scope), value: "any"
|
||||
|
||||
.row
|
||||
.alpha.three.columns
|
||||
|
||||
@@ -1712,6 +1712,7 @@ en:
|
||||
enterprise:
|
||||
primary_details: "Primary Details"
|
||||
address: "Address"
|
||||
admin_only: "Admin Only"
|
||||
contact: "Contact"
|
||||
social: "Social"
|
||||
about: "About"
|
||||
|
||||
@@ -8,7 +8,7 @@ RSpec.describe Api::V0::EnterprisesController, type: :controller do
|
||||
let(:enterprise) { create(:distributor_enterprise) }
|
||||
|
||||
context "as an admin user" do
|
||||
let(:admin) { create(:user) }
|
||||
let(:admin) { create(:admin_user) }
|
||||
let!(:enterprise) { create(:distributor_enterprise) }
|
||||
|
||||
before do
|
||||
@@ -18,13 +18,12 @@ RSpec.describe Api::V0::EnterprisesController, type: :controller do
|
||||
describe "updating an enterprise" do
|
||||
let(:enterprise_params) do
|
||||
{
|
||||
enterprise_id: enterprise.id,
|
||||
enterprise: { external_billing_id: 'INV123456' }
|
||||
external_billing_id: 'INV123456'
|
||||
}
|
||||
end
|
||||
|
||||
it "creates a visible=hidden enterprise" do
|
||||
api_post :create, enterprise_params
|
||||
it "changes the external_billing_id field" do
|
||||
api_put :update, id: enterprise.id, enterprise: enterprise_params
|
||||
expect(response.status).to eq 200
|
||||
|
||||
expect(enterprise.reload.external_billing_id).to eq('INV123456')
|
||||
|
||||
@@ -86,6 +86,10 @@ RSpec.describe '
|
||||
end
|
||||
|
||||
fill_in 'enterprise_name', with: 'Eaterprises'
|
||||
|
||||
accept_alert do
|
||||
click_link "Admin Only"
|
||||
end
|
||||
fill_in 'enterprise_permalink', with: 'eaterprises-permalink'
|
||||
expect(page).to have_selector '.available'
|
||||
choose 'Own'
|
||||
|
||||
@@ -64,6 +64,7 @@ RSpec.describe "Revenues By Hub Reports" do
|
||||
"Hub",
|
||||
"Hub ID",
|
||||
"Hub Business Number",
|
||||
"Hub External Billing Id",
|
||||
"Hub Legal Name",
|
||||
"Hub Contact Name",
|
||||
"Hub Public Email",
|
||||
@@ -89,6 +90,7 @@ RSpec.describe "Revenues By Hub Reports" do
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"email@email.com",
|
||||
"none",
|
||||
"10 Lovely Street",
|
||||
@@ -110,6 +112,7 @@ RSpec.describe "Revenues By Hub Reports" do
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"email@email.com",
|
||||
"none",
|
||||
"10 Lovely Street",
|
||||
@@ -131,6 +134,7 @@ RSpec.describe "Revenues By Hub Reports" do
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"none",
|
||||
"email@email.com",
|
||||
"none",
|
||||
"10 Lovely Street",
|
||||
|
||||
Reference in New Issue
Block a user