Fixing some regressions in tests, switching favicons

This commit is contained in:
Will Marshall
2014-06-26 15:04:32 +10:00
parent 0b8ca9af47
commit ed6bb2275a
5 changed files with 10 additions and 6 deletions

View File

@@ -4,7 +4,10 @@
%meta{name: 'viewport', content: "width=device-width,initial-scale=1.0"}/
%title= content_for?(:title) ? yield(:title) : 'Welcome to Open Food Network'
= favicon_link_tag "favicon.png"
- if Rails.env.production?
= favicon_link_tag
- else
= favicon_link_tag "/favicon-staging.ico"
%link{href: "https://fonts.googleapis.com/css?family=Open+Sans:400,700", rel: "stylesheet", type: "text/css"}/
= yield :scripts

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 0 B

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -14,14 +14,15 @@ describe HomeController do
assigns[:active_distributors].should == [distributor]
end
it "does not show invisible hubs" do
# Exclusion from actual rendered view handled in features/consumer/home
it "shows JSON for invisible hubs" do
get :index
response.body.should_not have_content invisible_distributor.name
response.body.should have_content invisible_distributor.name
end
# This is done inside the json/hubs RABL template
# This is done inside the json/hubs Serializer
it "gets the next order cycle for each hub" do
OrderCycle.should_receive(:first_closing_for).with(distributor)
OrderCycle.should_receive(:first_closing_for).twice
get :index
end
end

View File

@@ -5,7 +5,7 @@ describe ProducersController do
before do
Enterprise.stub(:distributors_with_active_order_cycles).and_return [distributor]
Enterprise.stub(:visible).and_return [distributor]
Enterprise.stub(:all).and_return [distributor]
end
it "sets active distributors" do