Coder Social home page Coder Social logo

Comments (3)

apotonick avatar apotonick commented on July 30, 2024

that's a pure rails testing issue. guess you have to

include ActionController::UrlWriter

in your TestController.

from cells.

subimage avatar subimage commented on July 30, 2024

Still bombing out...

require 'test_helper'

class ClientCellTest < ActionController::TestCase
  fixtures(
    :accounts, :estimates, :line_items, :people, :companies
  )
  include Cells::AssertionsHelper
  include ActionController::UrlWriter
  
  def test_select_control
    est = estimates(:auctions_redesign)
    
    cell = cell(
      :client, {
        :account => accounts(:paid),
        :select_name => 'estimate',
        :selected => est.client
      }
    )
    cell.select_control()
    
    html = render_cell(
      :client, 
      :select_control, 
      :account => accounts(:paid),
      :select_name => 'estimate',
      :selected => est.client
    )
    
    assert_selekt html, "span#selected_client_text"
  end
end
1) Error:
test_select_control(ClientCellTest):
ActionView::TemplateError: undefined method `rewrite' for nil:NilClass
On line #85 of app/cells/client/select_control.html.erb


82:       div.scrollTop = div.scrollHeight;
83:     },
84:     insertPerson: function(id) {
85:             var url = "<%= url_for(:controller => 'people', :action => 'show') %>";
86:             var pars = {}
87:             pars["id"] = id;
88:             new Ajax.Request(


app/cells/client/select_control.html.erb:85
app/cells/client_cell.rb:12:in `select_control'

from cells.

apotonick avatar apotonick commented on July 30, 2024

no, no, like
def setup
super
@controller.instance_eval do
include ActionController::UrlWriter

from cells.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.