Sha256: 2468e9aaeffa47cc98125c163939c80cfc42351bbef6446c74d79ac040d09cf6

Contents?: true

Size: 760 Bytes

Versions: 2

Compression:

Stored size: 760 Bytes

Contents

require 'test_helper'

module Alondra
  class ChatPushingTest < ActiveSupport::IntegrationCase

    self.use_transactional_fixtures = false

    setup do
      clean_db
      Capybara.default_driver = :webkit
    end

    teardown do
      clean_db
    end

    test "push chat changes to client" do

      user = FactoryGirl.create :user
      chat = FactoryGirl.create :chat, :name => 'A chat about nothing'

      login_as user

      chat_path = chat_path(chat)

      visit chat_path

      wait_until(5) do
        page.has_content? 'A chat about nothing'
      end

      chat.update_attributes! :name => 'A chat about everything'

      sleep(0.1)

      wait_until(15) do
        page.has_content? 'A chat about everything'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alondra-0.1.1 test/integration/push_changes_test.rb
alondra-0.1.0 test/integration/push_changes_test.rb