Sha256: e172ea9c65a5d34d0504dec8b8d773520d69e639a9a74eb5bd293a6515c8cd42

Contents?: true

Size: 787 Bytes

Versions: 46

Compression:

Stored size: 787 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')
    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

46 entries across 46 versions & 1 rubygems

Version Path
lalala-4.1.0.dev.425 test/integration/aricles_test.rb
lalala-4.1.0.dev.420 test/integration/aricles_test.rb
lalala-4.1.0.dev.419 test/integration/aricles_test.rb
lalala-4.1.0.dev.418 test/integration/aricles_test.rb
lalala-4.1.0.dev.417 test/integration/aricles_test.rb
lalala-4.1.0.dev.415 test/integration/aricles_test.rb
lalala-4.1.0.dev.414 test/integration/aricles_test.rb
lalala-4.1.0.dev.413 test/integration/aricles_test.rb
lalala-4.1.0.dev.412 test/integration/aricles_test.rb
lalala-4.1.0.dev.411 test/integration/aricles_test.rb
lalala-4.1.0.dev.410 test/integration/aricles_test.rb
lalala-4.1.0.dev.409 test/integration/aricles_test.rb
lalala-4.1.0.dev.408 test/integration/aricles_test.rb
lalala-4.1.0.dev.398 test/integration/aricles_test.rb
lalala-4.1.0.dev.397 test/integration/aricles_test.rb
lalala-4.1.0.dev.394 test/integration/aricles_test.rb
lalala-4.1.0.dev.392 test/integration/aricles_test.rb
lalala-4.1.0.dev.391 test/integration/aricles_test.rb
lalala-4.1.0.dev.390 test/integration/aricles_test.rb
lalala-4.1.0.dev.389 test/integration/aricles_test.rb