Add test for asset urls
[gitorious:gitorious-smoke-tests.git] / spec / gitorious_spec.rb
1 require 'spec_helper'
2
3 feature 'Gitorious' do
4
5   scenario 'Logging in, creating project & repository, pushing and pulling' do
6     name = gen_name
7     key = KeyPair.generate
8
9     login_page.login
10
11     keys_page.upload_public_key(key)
12
13     origin = project_page.create_repository(name)
14
15     git = Git.new(name, origin, key)
16     git.clone
17     git.configure_user
18     git.add_file(foo: 'a new file')
19     git.push
20
21     repository_page.open(name)
22     repository_page.should_include_file('foo')
23
24     head_sha = git.head_sha
25
26     repository_page.clone_urls.each do |protocol, url|
27       git = Git.new("#{name}-#{protocol}", url, key)
28       git.clone
29       git.head_sha.should == head_sha
30     end
31   end
32
33   scenario "Asset loading" do
34     home_page.open
35
36     home_page.should_include_valid_css_urls
37     home_page.should_include_valid_js_urls
38   end
39
40 end