Sha256: dee68ec3c107190170a86280df24850bf3491762fbd68e0576586bd2aff0e0f0

Contents?: true

Size: 874 Bytes

Versions: 52

Compression:

Stored size: 874 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class ArticlesTest < ActionDispatch::IntegrationTest

  def setup
    login_as_admin!
  end

  test 'list articles' do
    article = Article.create!(title: "Hello World")

    click_on('Articles')
    assert_equal 200, page.status_code
    assert page.assert_selector('a.resource_id_link', text: article.id.to_s)
  end

  test 'create article' do
    click_on('Articles')
    click_on('New Article')
    assert_equal('/lalala/articles/new', current_path)

    first('input[name="article[translations_writer][en][title]"]').set('My Article')
    attach_file('Image', File.expand_path('../../fixtures/files/image.png', __FILE__))
    click_on('Create Article')
    page.save_page
    assert_equal 200, page.status_code
    assert_equal('/lalala/articles/1', current_path)

    assert page.has_text?('My Article')
  end

end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
lalala-4.0.0.dev.416 test/integration/aricles_test.rb
lalala-4.0.0.dev.407 test/integration/aricles_test.rb
lalala-4.0.0.dev.396 test/integration/aricles_test.rb
lalala-4.0.0.dev.395 test/integration/aricles_test.rb
lalala-4.0.0.dev.393 test/integration/aricles_test.rb
lalala-4.0.0.dev.388 test/integration/aricles_test.rb
lalala-4.0.0.dev.385 test/integration/aricles_test.rb
lalala-4.0.0.dev.382 test/integration/aricles_test.rb
lalala-4.0.0.dev.374 test/integration/aricles_test.rb
lalala-4.0.0.dev.372 test/integration/aricles_test.rb
lalala-4.0.0.dev.368 test/integration/aricles_test.rb
lalala-4.0.0.dev.366 test/integration/aricles_test.rb
lalala-4.0.0.dev.357 test/integration/aricles_test.rb
lalala-4.0.0.dev.354 test/integration/aricles_test.rb
lalala-4.0.0.dev.351 test/integration/aricles_test.rb
lalala-4.0.0.dev.350 test/integration/aricles_test.rb
lalala-4.0.0.dev.349 test/integration/aricles_test.rb
lalala-4.0.0.dev.344 test/integration/aricles_test.rb
lalala-4.0.0.dev.343 test/integration/aricles_test.rb
lalala-4.0.0.dev.339 test/integration/aricles_test.rb