spec/shared/controllers.rb in fat_free_crm-0.11.1 vs spec/shared/controllers.rb in fat_free_crm-0.11.2
- old
+ new
@@ -19,13 +19,13 @@
unless controller.class.to_s.starts_with?("Admin::")
session[:auto_complete].should == @controller.controller_name.to_sym
end
end
- it "should render shared/auto_complete template" do
+ it "should render application/_auto_complete template" do
post :auto_complete, :auto_complete_query => @query
- response.should render_template("shared/auto_complete")
+ response.should render_template("application/_auto_complete")
end
end
shared_examples_for "attach" do
it "should attach existing asset to the parent asset of different type" do
@@ -37,11 +37,11 @@
assigns[:campaign].should == @attachment.reload.campaign
end
if @model.is_a?(Account) && @attachment.respond_to?(:account) # Skip Tasks...
assigns[:account].should == @attachment.reload.account
end
- response.should render_template("shared/attach")
+ response.should render_template("entities/attach")
end
it "should not attach the asset that is already attached" do
if @model.is_a?(Campaign) && (@attachment.is_a?(Lead) || @attachment.is_a?(Opportunity))
@attachment.update_attribute(:campaign_id, @model.id)
@@ -49,11 +49,11 @@
@model.send(@attachment.class.name.tableize) << @attachment
end
xhr :put, :attach, :id => @model.id, :assets => @attachment.class.name.tableize, :asset_id => @attachment.id
assigns[:attached].should == nil
- response.should render_template("shared/attach")
+ response.should render_template("entities/attach")
end
it "should display flash warning when the model is no longer available" do
@model.destroy
@@ -76,11 +76,11 @@
assigns[:attachment].should == @attachment.reload # The attachment should still exist.
@model.reload.send("#{@attachment.class.name.tableize}").should == [] # But no longer associated with the model.
assigns[:account].should == @model if @model.is_a?(Account)
assigns[:campaign].should == @model if @model.is_a?(Campaign)
- response.should render_template("shared/discard")
+ response.should render_template("entities/discard")
end
it "should display flash warning when the model is no longer available" do
@model.destroy
@@ -95,8 +95,6 @@
xhr :post, :discard, :id => @model.id, :attachment => @attachment.class.name, :attachment_id => @attachment.id
flash[:warning].should_not == nil
response.body.should == "window.location.reload();"
end
end
-
end
-