Sha256: 3183df28971ceaf6d4108833fa2f5e8e521420c97ac9b381c959102b72dcea3f

Contents?: true

Size: 1.05 KB

Versions: 18

Compression:

Stored size: 1.05 KB

Contents

require File.dirname(__FILE__) + "/../helpers/acceptance"

class ProjectSyndicationTest < Test::Unit::AcceptanceTestCase
  story <<-EOS
    As a user,
    I want to subscribe to a public project's Atom feed
    So I can know the status of my favorite projects while having my morning coffee
  EOS

  scenario "a public project's page includes an autodiscovery link tag for the feed" do
    Project.gen(:integrity, :public => true)
    visit "/integrity"

    assert_have_tag("link[@href='/integrity.atom']")
  end

  scenario "a public project's feed should include the latest builds" do
    commits = 10.of { Commit.gen(:successful) } + 1.of { Commit.gen(:failed) }
    Project.gen(:integrity, :public => true, :commits => commits)

    visit "/integrity.atom"

    # TODO: check for content-type

    assert_have_tag("feed title", :content => "Build history for Integrity")
    assert_have_tag("feed entry", :count => 11)
    assert_have_tag("feed entry:first title", :content => "success")
    assert_have_tag("feed entry:last title",  :content => "failed")
  end
end

Version data entries

18 entries across 18 versions & 6 rubygems

Version Path
alphasights-integrity-0.1.10 test/acceptance/project_syndication_test.rb
alphasights-integrity-0.1.9.3 test/acceptance/project_syndication_test.rb
alphasights-integrity-0.1.9.4 test/acceptance/project_syndication_test.rb
alphasights-integrity-0.1.9.5 test/acceptance/project_syndication_test.rb
alphasights-integrity-0.1.9.6 test/acceptance/project_syndication_test.rb
alphasights-integrity-0.1.9.7 test/acceptance/project_syndication_test.rb
alphasights-integrity-0.1.9.8 test/acceptance/project_syndication_test.rb
foca-integrity-0.1.9.2 test/acceptance/project_syndication_test.rb
foca-integrity-0.1.9.3 test/acceptance/project_syndication_test.rb
gforces-integrity-0.1.9.3 test/acceptance/project_syndication_test.rb
gforces-integrity-0.1.9.4 test/acceptance/project_syndication_test.rb
imbriaco-integrity-0.1.9.2.1 test/acceptance/project_syndication_test.rb
imbriaco-integrity-0.1.9.2 test/acceptance/project_syndication_test.rb
integrity-integrity-0.1.10 test/acceptance/project_syndication_test.rb
integrity-integrity-0.1.9.3 test/acceptance/project_syndication_test.rb
integrity-0.1.10 test/acceptance/project_syndication_test.rb
integrity-0.1.9.2 test/acceptance/project_syndication_test.rb
integrity-0.1.9.3 test/acceptance/project_syndication_test.rb